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/registrar/Registrar.php | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/inc/registrar/Registrar.php b/inc/registrar/Registrar.php
index 7c872fd..656ff15 100644
--- a/inc/registrar/Registrar.php
+++ b/inc/registrar/Registrar.php
@@ -267,14 +267,11 @@
$exclude = $cache->remember(
$feature,
function () use ($instance, $feature) {
- switch ($feature) {
- case 'hide_single':
- return $instance->excludeSingle();
- case 'is_timeline':
- return $instance->excludeTimeline();
- default:
- return [];
- }
+ return match ($feature) {
+ 'hide_single' => $instance->excludeSingle(),
+ 'is_timeline' => $instance->excludeTimeline(),
+ default => [],
+ };
}
);
@@ -483,7 +480,7 @@
error_log('Integration not available for '.$this->slug.': '.$integration);
return $this;
}
- $this->integrationConfigs[$integration] = new Integration($integration, $this);
+ $this->integrationConfigs[$integration] = new Integration($integration);
$this->integrationFields[$integration] = new AddIntegrationFields($integration, $this);
return $this;
}
--
Gitblit v1.10.0