Skip to content

Commit

Permalink
ENH Use class name instead of self
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jun 14, 2024
1 parent e830994 commit 7ad6f85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/EditableSpamProtectionField.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getFormField()

/**
* @param FormField $field
* @return self
* @return EditableSpamProtectionField
*/
public function setFormField(FormField $field)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Extension/FormSpamProtectionExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? '')) {
Expand Down Expand Up @@ -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.');
Expand Down

0 comments on commit 7ad6f85

Please sign in to comment.