Skip to content

Commit

Permalink
Customize fbt/fbs functions because of Laravel package
Browse files Browse the repository at this point in the history
  • Loading branch information
richardDobron committed Dec 9, 2023
1 parent 1bb22d7 commit d323039
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/fbt/helpers.php
Expand Up @@ -39,6 +39,10 @@ function mb_ord($charUTF8): int
*/
function fbt($text, string $description, array $options = []): fbt\fbt
{
if (class_exists(\fbt\LaravelPackage\fbt::class)) {
return new \fbt\LaravelPackage\fbt($text, $description, $options);
}

return new fbt\fbt($text, $description, $options);
}
}
Expand All @@ -53,6 +57,10 @@ function fbt($text, string $description, array $options = []): fbt\fbt
*/
function fbs($text, $description = null, array $options = []): fbt\fbs
{
if (class_exists(\fbt\LaravelPackage\fbs::class)) {
return new \fbt\LaravelPackage\fbs($text, $description, $options);
}

return new fbt\fbs($text, $description, $options);
}
}
Expand Down

0 comments on commit d323039

Please sign in to comment.