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/integrations/Requests.php | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/inc/integrations/Requests.php b/inc/integrations/Requests.php
index 633c6af..da6fd17 100644
--- a/inc/integrations/Requests.php
+++ b/inc/integrations/Requests.php
@@ -1,6 +1,8 @@
<?php
namespace JVBase\integrations;
+use WP_Error;
+
if (!defined('ABSPATH')) {
exit;
}
@@ -23,7 +25,7 @@
* Child classes inspect the wp_remote_request response,
* decode it, and handle/log errors as needed
*/
- abstract protected function handleResponse(array|\WP_Error $response, string $method, string $endpoint): array;
+ abstract protected function handleResponse(array|WP_Error $response, string $method, string $endpoint): array;
protected function initializeRequestLimiter():void
{
@@ -75,7 +77,7 @@
return [];
}
if ($this->requestLimiter && !$this->awaitRateLimit($endpoint)) {
- $error = new \WP_Error('rate_limit_exceeded', "Rate limit exceeded for {$endpoint}");
+ $error = new WP_Error('rate_limit_exceeded', "Rate limit exceeded for {$endpoint}");
return $this->handleResponse($error, $method, $endpoint);
}
--
Gitblit v1.10.0