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/blocks/FeedBlockOld.php | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/inc/blocks/FeedBlockOld.php b/inc/blocks/FeedBlockOld.php
index fcc482d..37f9b01 100644
--- a/inc/blocks/FeedBlockOld.php
+++ b/inc/blocks/FeedBlockOld.php
@@ -481,17 +481,14 @@
protected function defaultFieldTemplate(string $fieldType, string $fieldName):string
{
$data = ' data-field="'.$fieldName.'"';
- switch ($fieldName) {
- case 'post_title':
- return '<h3'.$data.'></h3>';
- case 'post_date':
- case 'post_modified':
- return '<time'.$data.'></time>';
- }
- return match($fieldType) {
- 'upload' => '<img'.$data.' width="300px" height="300px" sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 800px" loading="lazy" decoding="async">',
- 'taxonomy' => '<ul'.$data.'><li><a><i></i></a></li></ul>',
- default => '<p'.$data.'></p>',
+ return match ($fieldName) {
+ 'post_title' => '<h3' . $data . '></h3>',
+ 'post_date', 'post_modified' => '<time' . $data . '></time>',
+ default => match ($fieldType) {
+ 'upload' => '<img' . $data . ' width="300px" height="300px" sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 800px" loading="lazy" decoding="async">',
+ 'taxonomy' => '<ul' . $data . '><li><a><i></i></a></li></ul>',
+ default => '<p' . $data . '></p>',
+ },
};
}
/**
--
Gitblit v1.10.0