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/ImporterRoutes.php |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/inc/rest/routes/ImporterRoutes.php b/inc/rest/routes/ImporterRoutes.php
index 59840d1..682fef7 100644
--- a/inc/rest/routes/ImporterRoutes.php
+++ b/inc/rest/routes/ImporterRoutes.php
@@ -9,7 +9,6 @@
 use JVBase\rest\Route;
 use WP_REST_Request;
 use WP_REST_Response;
-use WP_Error;
 
 if (!defined('ABSPATH')) {
 	exit;
@@ -76,14 +75,14 @@
 		// Get uploaded file
 		$files = $request->get_file_params();
 		if (empty($files['file'])) {
-			return $this->error('No file uploaded', 'no_file', 400);
+			return $this->error('No file uploaded', 'no_file');
 		}
 
 		$file = $files['file'];
 
 		// Validate file type
 		if (!$this->isValidCSV($file)) {
-			return $this->error('Invalid file type. Please upload a CSV file.', 'invalid_file', 400);
+			return $this->error('Invalid file type. Please upload a CSV file.', 'invalid_file');
 		}
 
 		// Get and parse options
@@ -140,14 +139,14 @@
 		// Get uploaded file
 		$files = $request->get_file_params();
 		if (empty($files['file'])) {
-			return $this->error('No file uploaded', 'no_file', 400);
+			return $this->error('No file uploaded', 'no_file');
 		}
 
 		$file = $files['file'];
 
 		// Validate file type
 		if (!$this->isValidCSV($file)) {
-			return $this->error('Invalid file type. Please upload a CSV file.', 'invalid_file', 400);
+			return $this->error('Invalid file type. Please upload a CSV file.', 'invalid_file');
 		}
 
 		// Get and parse options

--
Gitblit v1.10.0