File tree 1 file changed +5
-2
lines changed 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Yajra \DataTables \Utilities ;
4
4
5
+ use Closure ;
5
6
use DateTime ;
6
7
use Illuminate \Contracts \Support \Arrayable ;
7
8
use Illuminate \Support \Arr ;
8
9
use Illuminate \Support \Str ;
10
+ use ReflectionFunction ;
9
11
10
12
class Helper
11
13
{
@@ -58,15 +60,16 @@ protected static function isItemOrderInvalid($item, $array)
58
60
* @param array $data data to use with blade template
59
61
* @param array|object $param parameter to call with callable
60
62
* @return mixed
63
+ * @throws \ReflectionException
61
64
*/
62
65
public static function compileContent ($ content , array $ data , array |object $ param )
63
66
{
64
67
if (is_string ($ content )) {
65
68
return static ::compileBlade ($ content , static ::getMixedValue ($ data , $ param ));
66
69
}
67
70
68
- if (is_callable ( $ content) ) {
69
- $ reflection = new \ ReflectionFunction ($ content );
71
+ if ($ content instanceof Closure ) {
72
+ $ reflection = new ReflectionFunction ($ content );
70
73
$ arguments = $ reflection ->getParameters ();
71
74
72
75
if (count ($ arguments ) > 0 ) {
You can’t perform that action at this time.
0 commit comments