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/utility/Video.php | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/inc/utility/Video.php b/inc/utility/Video.php
index f71c050..540116d 100644
--- a/inc/utility/Video.php
+++ b/inc/utility/Video.php
@@ -15,12 +15,8 @@
public function __construct()
{
- $this->cache = Cache::for('videos')->connect('post');
- $this->vidData = Cache::for('vidData')->connect('post');
- if (JVB_TESTING) {
- $this->cache->flush();
- $this->vidData->flush();
- }
+ $this->cache = Cache::for('videos', 'post');
+ $this->vidData = Cache::for('vidData', 'post');
}
public static function get(int $ID, array $args = []):string
{
@@ -29,7 +25,7 @@
public function formatVideo(int $ID, array $args = []):string
{
return $this->cache->remember(
- $this->cache->generateKey(array_merge(['id' => $ID], $args)),
+ array_merge(['id' => $ID], $args),
function() use ($ID, $args) {
$url = wp_get_attachment_url($ID);
$meta = wp_get_attachment_metadata($ID);
@@ -119,7 +115,7 @@
public function getImageData(int $imgID):array
{
- return $this->imgData->remember(
+ return $this->vidData->remember(
$imgID,
function() use ($imgID) {
if (!wp_get_attachment_image($imgID, 'tiny')) {
--
Gitblit v1.10.0