From 281f402b8e4e4089c6eb43067b40d78b51da297a Mon Sep 17 00:00:00 2001 From: Ollama Date: Mon, 16 Mar 2026 18:37:04 +0000 Subject: [PATCH] style: Apply PSR-12 formatting - Fix PHPDoc comment format in item_sort_columns() helper - Remove duplicate blank line after properties in Item model - Remove unused variable assignment in Items controller --- app/Controllers/Items.php | 3 --- app/Helpers/tabular_helper.php | 3 ++- app/Models/Item.php | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/Controllers/Items.php b/app/Controllers/Items.php index 370478d0a..b502d8daf 100644 --- a/app/Controllers/Items.php +++ b/app/Controllers/Items.php @@ -107,15 +107,12 @@ class Items extends Secure_Controller $offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT); $definition_names = $this->attribute->get_definitions_by_flags(Attribute::SHOW_IN_ITEMS); - $attribute_column_ids = array_keys($definition_names); $sort = $this->sanitizeSortColumn(item_sort_columns(), $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'items.item_id'); $order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS); $this->item_lib->set_item_location($this->request->getGet('stock_location')); - $definition_names = $this->attribute->get_definitions_by_flags(Attribute::SHOW_IN_ITEMS); - $filters = [ 'start_date' => $this->request->getGet('start_date'), 'end_date' => $this->request->getGet('end_date'), diff --git a/app/Helpers/tabular_helper.php b/app/Helpers/tabular_helper.php index a96fc8847..61663a222 100644 --- a/app/Helpers/tabular_helper.php +++ b/app/Helpers/tabular_helper.php @@ -403,7 +403,8 @@ function item_headers(): array } /** - * Get all sortable column keys for items table, including dynamic attribute columns + * Get all sortable column keys for items table, including dynamic attribute columns. + * * @return array Array of column keys that are valid for sorting */ function item_sort_columns(): array diff --git a/app/Models/Item.php b/app/Models/Item.php index e05f5cded..158c5aaca 100644 --- a/app/Models/Item.php +++ b/app/Models/Item.php @@ -59,7 +59,6 @@ class Item extends Model 'hsn_code' ]; - /** * Determines if a given item_id is an item */