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/fields/RepeaterField.php | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/inc/registrar/fields/RepeaterField.php b/inc/registrar/fields/RepeaterField.php
index 601634a..b29b2bf 100644
--- a/inc/registrar/fields/RepeaterField.php
+++ b/inc/registrar/fields/RepeaterField.php
@@ -2,6 +2,8 @@
namespace JVBase\registrar\fields;
+use ReflectionClass;
+
if (!defined('ABSPATH')) {
exit;
}
@@ -11,11 +13,11 @@
protected string $add_label = 'Add Row';
protected string $row_label = 'New Item';
- public function setAdd_label(string $label):void
+ public function setAddLabel(string $label):void
{
$this->add_label = $label;
}
- public function getAdd_label():string
+ public function getAddLabel():string
{
return $this->add_label;
}
@@ -27,13 +29,13 @@
$fields = array_filter(array_map(function($field) { return str_replace('}}','',$field);}, explode('{{',$variables)));
foreach ($fields as $field) {
if (!array_key_exists($field, $this->fields)) {
- error_log('['.(new \ReflectionClass($this))->getShortName().']Invalid field attempted: '.$field);
+ error_log('['.(new ReflectionClass($this))->getShortName().']Invalid field attempted: '.$field);
return false;
}
}
return true;
}
- public function setRow_label(string $label):void
+ public function setRowLabel(string $label):void
{
if (str_contains($label, '{{')) {
if (!$this->checkFieldVariables($label)) {
@@ -43,7 +45,7 @@
$this->row_label = $label;
}
- public function getRow_label():string
+ public function getRowLabel():string
{
return $this->row_label;
}
--
Gitblit v1.10.0