Skip to content

Commit b3df270

Browse files
update
1 parent afc1954 commit b3df270

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/helpers.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
use Tamedevelopers\Validator\Methods\ValidatorMethod;
77

88

9+
/**
10+
* Helps without calling the method multiple times
11+
*/
12+
$Tame_isAppFramework = function_exists('Tame_isAppFramework') ? Tame_isAppFramework() : false;
13+
14+
915
if (! function_exists('form')) {
1016

1117
/**
@@ -21,7 +27,7 @@ function form($attribute = null)
2127
}
2228
}
2329

24-
if (! Tame_isAppFramework() && ! function_exists('old')) {
30+
if (! $Tame_isAppFramework && ! function_exists('old')) {
2531

2632
/**
2733
* Return previously entered value
@@ -83,7 +89,7 @@ function config_form(?bool $error_type = false, ?bool $csrf_token = true, $reque
8389
}
8490
}
8591

86-
if (! Tame_isAppFramework() && ! function_exists('csrf_token')) {
92+
if (! $Tame_isAppFramework && ! function_exists('csrf_token')) {
8793

8894
/**
8995
* Get Csrf Token
@@ -96,7 +102,7 @@ function csrf_token()
96102
}
97103
}
98104

99-
if (! Tame_isAppFramework() && ! function_exists('csrf')) {
105+
if (! $Tame_isAppFramework && ! function_exists('csrf')) {
100106

101107
/**
102108
* Generate Input for Csrf Token

0 commit comments

Comments
 (0)