Skip to content

Commit

Permalink
Merge pull request #118 from creative-commoners/pulls/4.2/remove-self
Browse files Browse the repository at this point in the history
ENH Use class name instead of self
  • Loading branch information
GuySartorelli authored Jun 17, 2024
2 parents e830994 + 7ad6f85 commit 94ce39d
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 94ce39d

Please sign in to comment.