Skip to content

Commit

Permalink
Use new method in favor of deprecated one.
Browse files Browse the repository at this point in the history
  • Loading branch information
stelgenhof committed Sep 5, 2021
1 parent 7d3f036 commit b23d569
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Yasumi/Provider/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand All @@ -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');
}
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit b23d569

Please sign in to comment.