File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 22
33namespace Yajra \DataTables \Utilities ;
44
5+ use Closure ;
56use DateTime ;
67use Illuminate \Contracts \Support \Arrayable ;
78use Illuminate \Support \Arr ;
89use Illuminate \Support \Str ;
10+ use ReflectionFunction ;
911
1012class Helper
1113{
@@ -58,15 +60,16 @@ protected static function isItemOrderInvalid($item, $array)
5860 * @param array $data data to use with blade template
5961 * @param array|object $param parameter to call with callable
6062 * @return mixed
63+ * @throws \ReflectionException
6164 */
6265 public static function compileContent ($ content , array $ data , array |object $ param )
6366 {
6467 if (is_string ($ content )) {
6568 return static ::compileBlade ($ content , static ::getMixedValue ($ data , $ param ));
6669 }
6770
68- if (is_callable ( $ content) ) {
69- $ reflection = new \ ReflectionFunction ($ content );
71+ if ($ content instanceof Closure ) {
72+ $ reflection = new ReflectionFunction ($ content );
7073 $ arguments = $ reflection ->getParameters ();
7174
7275 if (count ($ arguments ) > 0 ) {
You can’t perform that action at this time.
0 commit comments