Skip to content

Commit

Permalink
Fix ${var}
Browse files Browse the repository at this point in the history
  • Loading branch information
MoamenEltouny authored Jun 3, 2024
1 parent 490c605 commit d4d4cb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Hijri.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public function getTranslatedDayName(?string $context = null, string $keySuffix
protected function getTranslatedFormByRegExp($baseKey, $keySuffix, $context, $subKey, $defaultValue)
{
$key = $baseKey . $keySuffix;
$standaloneKey = "${key}_standalone";
$standaloneKey = $key . '_standalone';
$baseTranslation = $this->getTranslationMessage($key);

if ($baseTranslation instanceof Closure) {
Expand All @@ -215,7 +215,7 @@ protected function getTranslatedFormByRegExp($baseKey, $keySuffix, $context, $su

if (
$this->getTranslationMessage("$standaloneKey.$subKey") &&
(!$context || ($regExp = $this->getTranslationMessage("${baseKey}_regexp")) && !preg_match($regExp, $context))
(!$context || ($regExp = $this->getTranslationMessage("$baseKey_regexp")) && !preg_match($regExp, $context))
) {
$key = $standaloneKey;
}
Expand Down

0 comments on commit d4d4cb2

Please sign in to comment.