From 7ad6f8584fe596f288d5446ec445dd81307e0b2c Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Fri, 14 Jun 2024 21:49:04 +1200 Subject: [PATCH] ENH Use class name instead of self --- src/EditableSpamProtectionField.php | 2 +- src/Extension/FormSpamProtectionExtension.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/EditableSpamProtectionField.php b/src/EditableSpamProtectionField.php index 323a47a..033c26a 100644 --- a/src/EditableSpamProtectionField.php +++ b/src/EditableSpamProtectionField.php @@ -86,7 +86,7 @@ public function getFormField() /** * @param FormField $field - * @return self + * @return EditableSpamProtectionField */ public function setFormField(FormField $field) { diff --git a/src/Extension/FormSpamProtectionExtension.php b/src/Extension/FormSpamProtectionExtension.php index 921fb99..f3c8178 100644 --- a/src/Extension/FormSpamProtectionExtension.php +++ b/src/Extension/FormSpamProtectionExtension.php @@ -71,7 +71,7 @@ public static function get_protector($options = null) if (isset($options['protector'])) { $protector = $options['protector']; } else { - $protector = self::config()->get('default_spam_protector'); + $protector = static::config()->get('default_spam_protector'); } if ($protector && class_exists($protector ?? '')) { @@ -106,7 +106,7 @@ public function enableSpamProtection($options = []) } // set custom mapping on this form - $protector = self::get_protector($options); + $protector = FormSpamProtectionExtension::get_protector($options); if ($protector === null) { throw new LogicException('No spam protector has been set. Null is not valid value.');