From 6d5f6a86655c7d744127d5da9346362fc9b7f630 Mon Sep 17 00:00:00 2001 From: Kavalar Date: Fri, 2 Aug 2024 12:06:57 +0300 Subject: [PATCH] fix methods names --- src/ListJsonTable.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ListJsonTable.php b/src/ListJsonTable.php index 10960c7..74e3218 100644 --- a/src/ListJsonTable.php +++ b/src/ListJsonTable.php @@ -119,7 +119,7 @@ class ListJsonTable foreach ($row as $key => $ceil) { if ($this->issetColumn($key) and $this->is_fillable($key)) { if($this->beforePrintCell) { - $ceil = $this->setCustomHandler($this->beforePrintCell, $key, $ceil); + $ceil = $this->getCustomCeil($key, $ceil); } $this->html .= "" . $ceil . ""; } @@ -311,9 +311,9 @@ class ListJsonTable } } - public function setCustomHandler(Closure|array $handler, string $key, string $ceil) + public function getCustomCeil(string $key, string $ceil) { - if (is_array($handler)) { + if (is_array($this->beforePrintCell)) { foreach ($this->beforePrintCell as $column => $closure) { if ($key == $column) { $hook = $closure; @@ -324,7 +324,7 @@ class ListJsonTable $hook = $this->beforePrintCell; $ceil = $hook($key, $ceil); } - return $ceil; + return $ceil; } } \ No newline at end of file