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/managers/CacheBack.php | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/inc/managers/CacheBack.php b/inc/managers/CacheBack.php
index 2bf98e7..69f8a7a 100644
--- a/inc/managers/CacheBack.php
+++ b/inc/managers/CacheBack.php
@@ -1,6 +1,10 @@
<?php
namespace JVBase\managers;
+use Redis;
+use WP_Object_Cache;
+use WP_Post;
+
if (!defined('ABSPATH')) {
exit;
}
@@ -135,7 +139,7 @@
return $value;
}
- public function get(int|string|array $id): mixed
+ public function get(int|string|array $id): bool
{
return false;
if (is_array($id)) {
@@ -361,11 +365,11 @@
/****************************************************
* REDIS
****************************************************/
- private static function redis(): ?\Redis
+ private static function redis(): ?Redis
{
global $wp_object_cache;
- return $wp_object_cache instanceof \WP_Object_Cache
+ return $wp_object_cache instanceof WP_Object_Cache
&& isset($wp_object_cache->redis)
? $wp_object_cache->redis
: null;
@@ -490,7 +494,7 @@
/****************************************************
* HOOKS - Posts
****************************************************/
- public static function onPostChange(int $postId, \WP_Post $post): void
+ public static function onPostChange(int $postId, WP_Post $post): void
{
if (wp_is_post_revision($postId) || wp_is_post_autosave($postId)) {
return;
--
Gitblit v1.10.0