From e6447ab573510672cb5b4061a7be9d1e888e4dd9 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Thu, 11 Jan 2024 14:28:37 +1300 Subject: [PATCH] ENH Add generic types --- src/Extension/AccountReset/MFAResetExtension.php | 2 +- src/Extension/AccountReset/MemberExtension.php | 4 ++-- src/Extension/AccountReset/SecurityAdminExtension.php | 3 +-- src/Extension/AccountReset/SecurityExtension.php | 3 +-- src/Extension/MemberExtension.php | 3 ++- src/Extension/RequirementsExtension.php | 3 +++ src/Extension/SiteConfigExtension.php | 3 +++ 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/Extension/AccountReset/MFAResetExtension.php b/src/Extension/AccountReset/MFAResetExtension.php index 18cee54b..bc5c655b 100644 --- a/src/Extension/AccountReset/MFAResetExtension.php +++ b/src/Extension/AccountReset/MFAResetExtension.php @@ -13,7 +13,7 @@ * resets the 'MFA Skipped' flag on the member so that they are prompted to * set up MFA again when they next log in. * - * @package SilverStripe\MFA\Extension\AccountReset + * @extends Extension */ class MFAResetExtension extends Extension { diff --git a/src/Extension/AccountReset/MemberExtension.php b/src/Extension/AccountReset/MemberExtension.php index d73838ae..1ef3cc34 100644 --- a/src/Extension/AccountReset/MemberExtension.php +++ b/src/Extension/AccountReset/MemberExtension.php @@ -14,10 +14,10 @@ /** * Provides DB columns / methods for account resets on Members * - * @package SilverStripe\MFA\Extension - * @property Member&MemberExtension $owner * @property string $AccountResetHash * @property DBDatetime $AccountResetExpired + * + * @extends DataExtension */ class MemberExtension extends DataExtension { diff --git a/src/Extension/AccountReset/SecurityAdminExtension.php b/src/Extension/AccountReset/SecurityAdminExtension.php index f4bc79d6..647fc91e 100644 --- a/src/Extension/AccountReset/SecurityAdminExtension.php +++ b/src/Extension/AccountReset/SecurityAdminExtension.php @@ -23,8 +23,7 @@ * This extension is applied to SecurityAdmin to provide an additional endpoint * for sending account reset requests. * - * @package SilverStripe\MFA\Extension - * @property SecurityAdmin $owner + * @extends Extension */ class SecurityAdminExtension extends Extension { diff --git a/src/Extension/AccountReset/SecurityExtension.php b/src/Extension/AccountReset/SecurityExtension.php index d967f42b..144cdcd6 100644 --- a/src/Extension/AccountReset/SecurityExtension.php +++ b/src/Extension/AccountReset/SecurityExtension.php @@ -25,8 +25,7 @@ * itself be extended to add procedures to the reset action (such as removing * additional authentication factors, sending alerts, etc.) * - * @package SilverStripe\MFA\Extension - * @property Security $owner + * @extends Extension */ class SecurityExtension extends Extension { diff --git a/src/Extension/MemberExtension.php b/src/Extension/MemberExtension.php index 06c5b562..bc072337 100644 --- a/src/Extension/MemberExtension.php +++ b/src/Extension/MemberExtension.php @@ -24,8 +24,9 @@ * @property MethodInterface $DefaultRegisteredMethod * @property string $DefaultRegisteredMethodID * @property bool $HasSkippedMFARegistration - * @property Member|MemberExtension $owner * @method HasManyList RegisteredMFAMethods() + * + * @extends DataExtension */ class MemberExtension extends DataExtension implements PermissionProvider { diff --git a/src/Extension/RequirementsExtension.php b/src/Extension/RequirementsExtension.php index d8f8a108..10963245 100644 --- a/src/Extension/RequirementsExtension.php +++ b/src/Extension/RequirementsExtension.php @@ -6,6 +6,9 @@ use SilverStripe\Core\Extension; use SilverStripe\MFA\RequestHandler\BaseHandlerTrait; +/** + * @extends Extension + */ class RequirementsExtension extends Extension { use BaseHandlerTrait; diff --git a/src/Extension/SiteConfigExtension.php b/src/Extension/SiteConfigExtension.php index 186cd38f..2487d4f0 100644 --- a/src/Extension/SiteConfigExtension.php +++ b/src/Extension/SiteConfigExtension.php @@ -9,6 +9,7 @@ use SilverStripe\Forms\OptionsetField; use SilverStripe\ORM\DataExtension; use SilverStripe\ORM\FieldType\DBField; +use SilverStripe\SiteConfig\SiteConfig; use SilverStripe\View\Requirements; /** @@ -16,6 +17,8 @@ * * @property bool $MFARequired * @property string $MFAGracePeriodExpires + * + * @extends DataExtension */ class SiteConfigExtension extends DataExtension {