Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Use class name instead of self #118

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading