Merge pull request #118 from creative-commoners/pulls/4.2/remove-self

ENH Use class name instead of self
This commit is contained in:
Guy Sartorelli 2024-06-17 12:44:49 +12:00 committed by GitHub
commit 94ce39d7d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -86,7 +86,7 @@ class EditableSpamProtectionField extends EditableFormField
/**
* @param FormField $field
* @return self
* @return EditableSpamProtectionField
*/
public function setFormField(FormField $field)
{

View File

@ -71,7 +71,7 @@ class FormSpamProtectionExtension extends Extension
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 @@ class FormSpamProtectionExtension extends Extension
}
// 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.');