mirror of
https://github.com/silverstripe/silverstripe-spamprotection.git
synced 2024-10-22 14:05:59 +02:00
ENH Use class name instead of self
This commit is contained in:
parent
e83099413b
commit
7ad6f8584f
@ -86,7 +86,7 @@ class EditableSpamProtectionField extends EditableFormField
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param FormField $field
|
* @param FormField $field
|
||||||
* @return self
|
* @return EditableSpamProtectionField
|
||||||
*/
|
*/
|
||||||
public function setFormField(FormField $field)
|
public function setFormField(FormField $field)
|
||||||
{
|
{
|
||||||
|
@ -71,7 +71,7 @@ class FormSpamProtectionExtension extends Extension
|
|||||||
if (isset($options['protector'])) {
|
if (isset($options['protector'])) {
|
||||||
$protector = $options['protector'];
|
$protector = $options['protector'];
|
||||||
} else {
|
} else {
|
||||||
$protector = self::config()->get('default_spam_protector');
|
$protector = static::config()->get('default_spam_protector');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($protector && class_exists($protector ?? '')) {
|
if ($protector && class_exists($protector ?? '')) {
|
||||||
@ -106,7 +106,7 @@ class FormSpamProtectionExtension extends Extension
|
|||||||
}
|
}
|
||||||
|
|
||||||
// set custom mapping on this form
|
// set custom mapping on this form
|
||||||
$protector = self::get_protector($options);
|
$protector = FormSpamProtectionExtension::get_protector($options);
|
||||||
|
|
||||||
if ($protector === null) {
|
if ($protector === null) {
|
||||||
throw new LogicException('No spam protector has been set. Null is not valid value.');
|
throw new LogicException('No spam protector has been set. Null is not valid value.');
|
||||||
|
Loading…
Reference in New Issue
Block a user