Skip to content

Commit

Permalink
refactor: remove php7 code
Browse files Browse the repository at this point in the history
  • Loading branch information
jmosul committed Jan 10, 2019
1 parent 43257cb commit e300554
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PublicHolidays.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ public static function getDate(Carbon $carbon)
return $holiday['date'] === $carbon->format('Y-m-d');
});

return array_values($filtered)[0] ?? null;
return reset($filtered) ?: null;
}

/**
* @param string $region
* @return array
*/
public static function region(string $region)
public static function region($region)
{
return static::all()[$region]['events'];
}

/**
* @param string $region
*/
public static function setRegion(string $region)
public static function setRegion($region)
{
static::$region = $region;
}
Expand Down

0 comments on commit e300554

Please sign in to comment.