Skip to content

Commit

Permalink
Fix functions type
Browse files Browse the repository at this point in the history
  • Loading branch information
MoamenEltouny committed Jul 19, 2024
1 parent 4a73a4e commit b5edacf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Hijri.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private function convertToHijri()
*
* @return static
*/
public static function parse($time = null, $tz = null)
public static function parse($time = null, $tz = null): static
{
return self::$HIJRI_INSTANCE->prepare(parent::parse($time, $tz));
}
Expand All @@ -158,7 +158,7 @@ public static function parse($time = null, $tz = null)
*
* @return $this|string
*/
public function locale(string $locale = null, ...$fallbackLocales)
public function locale(string $locale = null, ...$fallbackLocales): static|string
{
if ($locale === null) {
return $this->getTranslatorLocale();
Expand Down Expand Up @@ -201,7 +201,7 @@ public function locale(string $locale = null, ...$fallbackLocales)
*
* @return string
*/
public function getTranslatedDayName($context = null, $keySuffix = '', $defaultValue = null)
public function getTranslatedDayName($context = null, $keySuffix = '', $defaultValue = null): string
{
return $this->getTranslatedFormByRegExp('weekdays', $keySuffix, $context, $this->CURRENT_DAY, $defaultValue ?: $this->englishDayOfWeek);
}
Expand Down Expand Up @@ -235,7 +235,7 @@ protected function getTranslatedFormByRegExp($baseKey, $keySuffix, $context, $su
*
* @return string
*/
public function getTranslatedMonthName($context = null, $keySuffix = '', $defaultValue = null)
public function getTranslatedMonthName($context = null, $keySuffix = '', $defaultValue = null): string
{
return $this->getTranslatedFormByRegExp('months', $keySuffix, $context, $this->month - 1, $defaultValue ?: $this->englishMonth);
}
Expand Down

0 comments on commit b5edacf

Please sign in to comment.