From a9654f00c8fbc9934289d761843ddd071025013f Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 28 Aug 2026 17:20:28 +0000
Subject: [PATCH] =PHPStorm Code Inspection: fixed class reference errors (from getting rid of JVB() and replacing with direct class::getInstance; as well as general code sniffing, etc

---
 inc/rest/routes/ContentTermsRoutes.php |   50 +++++++++++++++++++++++++-------------------------
 1 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/inc/rest/routes/ContentTermsRoutes.php b/inc/rest/routes/ContentTermsRoutes.php
index 1884aeb..dbc191c 100644
--- a/inc/rest/routes/ContentTermsRoutes.php
+++ b/inc/rest/routes/ContentTermsRoutes.php
@@ -11,7 +11,6 @@
 use JVBase\rest\Rest;
 use JVBase\rest\Route;
 use JVBase\rest\PermissionHandler;
-use JVBase\base\Site;
 use JVBase\managers\CustomTable;
 use WP_REST_Request;
 use WP_REST_Response;
@@ -269,7 +268,7 @@
 			$total = $query->countResults();
 
 			$members = $query
-				->orderBy('is_primary', 'DESC')
+				->orderBy('is_primary')
 				->orderBy('created_at', 'ASC')
 				->limit($perPage, $offset)
 				->getResults(ARRAY_A);
@@ -338,7 +337,7 @@
 			$total = $query->countResults();
 
 			$requests = $query
-				->orderBy('created_date', 'DESC')
+				->orderBy('created_date')
 				->limit($perPage, $offset)
 				->getResults(ARRAY_A);
 
@@ -463,16 +462,16 @@
 				}
 			});
 
-			// Notify user
-			NotificationManager::getInstance()->addNotification(
-				$requestData['user_id'],
-				'request_' . $status,
-				[
-					'term_id' => $requestData['term_id'],
-					'taxonomy' => $this->taxonomy,
-					'notes' => $notes
-				]
-			);
+			// Notify user TODO
+//			NotificationManager::getInstance()->notify(
+//				$requestData['user_id'],
+//				'request_' . $status,
+//				[
+//					'term_id' => $requestData['term_id'],
+//					'taxonomy' => $this->taxonomy,
+//					'notes' => $notes
+//				]
+//			);
 
 			$this->cache->flush();
 
@@ -548,17 +547,18 @@
 
 		$term = get_term($termID, jvbCheckBase($this->taxonomy));
 
-		foreach ($managers as $managerID) {
-			NotificationManager::getInstance()->addNotification(
-				$managerID,
-				$notificationType,
-				[
-					'user_id' => $actingUserID,
-					'term_id' => $termID,
-					'term_name' => $term->name ?? 'Unknown',
-					'taxonomy' => $this->taxonomy
-				]
-			);
-		}
+		//TODO
+//		foreach ($managers as $managerID) {
+//			NotificationManager::getInstance()->addNotification(
+//				$managerID,
+//				$notificationType,
+//				[
+//					'user_id' => $actingUserID,
+//					'term_id' => $termID,
+//					'term_name' => $term->name ?? 'Unknown',
+//					'taxonomy' => $this->taxonomy
+//				]
+//			);
+//		}
 	}
 }

--
Gitblit v1.10.0