ENH Add generic types

This commit is contained in:
Guy Sartorelli 2024-01-11 16:32:12 +13:00
parent a5b2363e35
commit 6004df917e
No known key found for this signature in database
GPG Key ID: F313E3B9504D496A
3 changed files with 6 additions and 7 deletions

View File

@ -98,7 +98,7 @@ class EditableSpamProtectionField extends EditableFormField
/**
* Gets the list of all candidate spam detectable fields on this field's form
*
* @return DataList
* @return DataList<EditableFormField>
*/
protected function getCandidateFields()
{
@ -151,7 +151,6 @@ class EditableSpamProtectionField extends EditableFormField
*/
public function getCMSFields()
{
/** @var FieldList $fields */
$fields = parent::getCMSFields();
// Get protector

View File

@ -2,14 +2,14 @@
namespace SilverStripe\SpamProtection\Extension;
use SilverStripe\Comments\Controllers\CommentingController;
use SilverStripe\Core\Extension;
/**
* Apply the spam protection to the comments module if it is installed.
*
* @package spamprotection
* @extends Extension<CommentingController>
*/
class CommentSpamProtection extends Extension
{
public function alterCommentForm(&$form)

View File

@ -6,14 +6,14 @@ use LogicException;
use SilverStripe\Core\Config\Configurable;
use SilverStripe\Core\Extension;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Forms\Form;
/**
* An extension to the {@link Form} class which provides the method
* {@link enableSpamProtection()} helper.
*
* @package spamprotection
* @extends Extension<Form>
*/
class FormSpamProtectionExtension extends Extension
{
use Configurable;
@ -86,7 +86,7 @@ class FormSpamProtectionExtension extends Extension
*
* @param array $options
* @throws LogicException when get_protector method returns NULL.
* @return Object
* @return Form
*/
public function enableSpamProtection($options = [])
{