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/Approvals.php | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/inc/managers/Approvals.php b/inc/managers/Approvals.php
index 58c412f..db33a25 100644
--- a/inc/managers/Approvals.php
+++ b/inc/managers/Approvals.php
@@ -41,7 +41,7 @@
$types = Registrar::withFeature('approve_new');
foreach ($types as $type) {
$requests = CustomTable::for("approval_{$type}_requests");
- $registrar = Registrar::getInstance($type);
+// $registrar = Registrar::getInstance($type);
$requests->setColumns([
'id' => 'bigint(20) unsigned NOT NULL AUTO_INCREMENT',
@@ -359,7 +359,7 @@
}
} elseif ($registrar->getType() === 'user') {
$user = get_userdata($request['user_id']);
- $user->add_cap('skip_moderation', true);
+ $user->add_cap('skip_moderation');
update_user_meta($request['user_id'], BASE.'verification_date', current_time('mysql'));
}
@@ -424,7 +424,7 @@
}, $allRequests);
} else {
foreach ($this->tables as $type => $tables) {
- $requests = $tables['requests'];;
+ $requests = $tables['requests'];
$active = $requests->pluck('request_id', [
'status' => 'pending',
]);
--
Gitblit v1.10.0