File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ trait Call
1010
1111 protected function call (mixed $ callback = null ): mixed
1212 {
13- return $ this ->isCallable ($ callback ) ? $ callback () : $ callback ;
13+ return $ this ->isCallable ($ callback ) && ! $ this -> isFunction ( $ callback ) ? $ callback () : $ callback ;
1414 }
1515
1616 protected function makeCallable ($ value ): callable
1717 {
18- if ($ this ->isCallable ($ value )) {
18+ if ($ this ->isCallable ($ value ) && ! $ this -> isFunction ( $ value ) ) {
1919 return $ value ;
2020 }
2121
@@ -28,4 +28,9 @@ protected function isCallable($value): bool
2828 {
2929 return is_callable ($ value );
3030 }
31+
32+ protected function isFunction ($ value ): bool
33+ {
34+ return is_string ($ value ) && function_exists ($ value );
35+ }
3136}
Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ abstract class TestCase extends BaseTestCase
2828
2929 protected array $ keys = ['Foo ' , 'Bar ' , 'Baz ' ];
3030
31- protected mixed $ value = 'Foo ' ;
31+ protected mixed $ value = 'value ' ;
3232
33- protected string $ value_second = 'Bar ' ;
33+ protected string $ value_second = 'Foo ' ;
3434
3535 protected function getPackageProviders ($ app ): array
3636 {
You can’t perform that action at this time.
0 commit comments