From 63e0233ed99d766f38bb6bfbcd0ad55f5af4c662 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Wed, 30 Oct 2024 09:38:03 -0400 Subject: [PATCH] Fix unused data --- www-api/app/Controllers/WrenchPlayGround.php | 16 ++++++++-------- www-api/app/Controllers/WrenchResources.php | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/www-api/app/Controllers/WrenchPlayGround.php b/www-api/app/Controllers/WrenchPlayGround.php index abee271f..fe5d6ea2 100644 --- a/www-api/app/Controllers/WrenchPlayGround.php +++ b/www-api/app/Controllers/WrenchPlayGround.php @@ -155,17 +155,17 @@ class WrenchPlayGround extends BaseController $out["result_list"][] =[ "name" => " There is name 3333", "banner" => "If any banner is needed ", - "item_list" => $this->apiData() + "item_list" => $this->apiExtraData() ]; $out["result_list"][] =[ "name" => " There is name 3333", "banner" => "If any banner is needed ", - "item_list" => $this->apiData() + "item_list" => $this->apiExtraData() ]; $out["result_list"][] =[ "name" => " There is name 3333", "banner" => "If any banner is needed ", - "item_list" => $this->apiData() + "item_list" => $this->apiExtraData() ]; @@ -183,7 +183,7 @@ class WrenchPlayGround extends BaseController return $in; } - private function apiFeaturedData() { + private function apiFeaturedData():array{ $data=[]; $data["item"][] = array( "banner" => "I have no idea", @@ -212,7 +212,7 @@ class WrenchPlayGround extends BaseController return $data; } - private function apiSharedData() { + private function apiSharedData():array { $data=[]; $total = 0; for ($i = 0; $i < $total; $i++) { @@ -225,7 +225,7 @@ class WrenchPlayGround extends BaseController } return $data; } - private function apiCollectionData() { + private function apiCollectionData():array { $data=[]; $total = 0; for ($i = 0; $i < $total; $i++) { @@ -239,8 +239,8 @@ class WrenchPlayGround extends BaseController return $data; } - private function apiData() { - + private function apiExtraData():array { + $data = []; $total = rand(1,3); for ($i = 0; $i < $total; $i++) { $key = sprintf("%05d", $i); diff --git a/www-api/app/Controllers/WrenchResources.php b/www-api/app/Controllers/WrenchResources.php index 71d8dc46..1ec784cd 100644 --- a/www-api/app/Controllers/WrenchResources.php +++ b/www-api/app/Controllers/WrenchResources.php @@ -103,9 +103,9 @@ class WrenchResources extends BaseController $res1['tab_categories'] = $this->CategoryData(); $res1['ask_categories'] = $this->AskCategoryData(); $res1['upload_types'] = $this->uploadTypes(); - $res1['marketdata'] = $this->MarketData(); - $res1['productdata'] = $this->ProductData(); - $res1['collectiondata'] = $this->CollectionData(); + $res1['marketdata'] = []; // $this->MarketData(); + $res1['productdata'] = []; // $this->ProductData(); + $res1['collectiondata'] = []; // $this->CollectionData(); $res1['blogdata']["payload"] = $this->getBlogData(); return $this->response->setJson($res1); }