From 0849d443acd701b6c24ecabf5122f9230fd2541d Mon Sep 17 00:00:00 2001 From: BMTmohammedtaha Date: Wed, 27 Sep 2023 14:01:59 +0200 Subject: [PATCH] fix fetchPretty --- src/DB.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/DB.php b/src/DB.php index 972eee7..e097e40 100644 --- a/src/DB.php +++ b/src/DB.php @@ -433,6 +433,12 @@ public function fetchPretty(callable|DataRules $rules): ?array { $data = $this->fetch(); if (is_array($data)) { + if($rules instanceof DataRules){ + // $rules = $rules->getRules(); + $rules = function($rules){ + $rules; + }; + } return (new DataOptimizer($data))->optimize($rules); } return null;