Skip to content

Commit

Permalink
style: fix code styling issues
Browse files Browse the repository at this point in the history
Signed-off-by: Sacha Telgenhof <me@sachatelgenhof.com>
  • Loading branch information
stelgenhof committed Oct 24, 2024
1 parent 5c28f50 commit 1f3fe1e
Show file tree
Hide file tree
Showing 20 changed files with 93 additions and 93 deletions.
2 changes: 1 addition & 1 deletion src/Yasumi/Filters/BetweenFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/Yasumi/Filters/OnFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/Yasumi/Holiday.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/Yasumi/Provider/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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.');
Expand Down
4 changes: 2 additions & 2 deletions src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected function easterSunday(
int $year,
string $timezone,
string $locale,
?string $type = null
?string $type = null,
): Holiday {
return new Holiday(
'easter',
Expand Down Expand Up @@ -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'));

Expand Down
2 changes: 1 addition & 1 deletion src/Yasumi/Provider/Australia/NewSouthWales.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));

Expand Down
2 changes: 1 addition & 1 deletion src/Yasumi/Provider/Australia/NorthernTerritory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));

Expand Down
2 changes: 1 addition & 1 deletion src/Yasumi/Provider/Australia/SouthAustralia.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));

Expand Down
4 changes: 2 additions & 2 deletions src/Yasumi/Provider/Australia/Victoria.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected function easterSunday(
int $year,
string $timezone,
string $locale,
?string $type = null
?string $type = null,
): Holiday {
return new Holiday(
'easter',
Expand Down Expand Up @@ -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'));

Expand Down
2 changes: 1 addition & 1 deletion src/Yasumi/Provider/Canada/Quebec.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
44 changes: 22 additions & 22 deletions src/Yasumi/Provider/ChristianHolidays.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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'));
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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);
}
Expand All @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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'));
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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'));
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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',
Expand Down
Loading

0 comments on commit 1f3fe1e

Please sign in to comment.