Skip to content

Commit

Permalink
Fix stan
Browse files Browse the repository at this point in the history
  • Loading branch information
yajra committed Jun 21, 2022
1 parent 3cd1ddd commit 4f2db32
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Utilities/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

namespace Yajra\DataTables\Utilities;

use Closure;
use DateTime;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use ReflectionFunction;

class Helper
{
Expand Down Expand Up @@ -58,15 +60,16 @@ protected static function isItemOrderInvalid($item, $array)
* @param array $data data to use with blade template
* @param array|object $param parameter to call with callable
* @return mixed
* @throws \ReflectionException
*/
public static function compileContent($content, array $data, array|object $param)
{
if (is_string($content)) {
return static::compileBlade($content, static::getMixedValue($data, $param));
}

if (is_callable($content)) {
$reflection = new \ReflectionFunction($content);
if ($content instanceof Closure) {
$reflection = new ReflectionFunction($content);
$arguments = $reflection->getParameters();

if (count($arguments) > 0) {
Expand Down

0 comments on commit 4f2db32

Please sign in to comment.