From c9798b6bc7d521a6ebfb0383882de397accc5156 Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 5 Jan 2024 19:09:40 +0900 Subject: [PATCH 1/2] docs: make PHPDoc type more specific --- system/View/Table.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/View/Table.php b/system/View/Table.php index 0cab38fb4f39..7c16efb59cd3 100644 --- a/system/View/Table.php +++ b/system/View/Table.php @@ -25,7 +25,7 @@ class Table /** * Data for table rows * - * @var array + * @var list|list> */ public $rows = []; @@ -258,7 +258,7 @@ public function setSyncRowsWithHeading(bool $orderByKey) * * Ensures a standard associative array format for all cell data * - * @return array + * @return array|list */ protected function _prepArgs(array $args) { From 7602145d38a93debaff4966c9c985a70c976d971 Mon Sep 17 00:00:00 2001 From: kenjis Date: Fri, 5 Jan 2024 19:10:10 +0900 Subject: [PATCH 2/2] refactor: remove unneeded if condition --- system/View/Table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/View/Table.php b/system/View/Table.php index 7c16efb59cd3..c9cd33d39ac6 100644 --- a/system/View/Table.php +++ b/system/View/Table.php @@ -381,7 +381,7 @@ public function generate($tableData = null) $cell = $cell['data'] ?? ''; $out .= $temp; - if ($cell === '' || $cell === null) { + if ($cell === '') { $out .= $this->emptyCells; } elseif (isset($this->function)) { $out .= ($this->function)($cell);