Skip to content

Commit

Permalink
ENH Add generic types
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Jan 11, 2024
1 parent d093208 commit e6447ab
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Extension/AccountReset/MFAResetExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<SecurityExtension>
*/
class MFAResetExtension extends Extension
{
Expand Down
4 changes: 2 additions & 2 deletions src/Extension/AccountReset/MemberExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<Member&static>
*/
class MemberExtension extends DataExtension
{
Expand Down
3 changes: 1 addition & 2 deletions src/Extension/AccountReset/SecurityAdminExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<SecurityAdmin>
*/
class SecurityAdminExtension extends Extension
{
Expand Down
3 changes: 1 addition & 2 deletions src/Extension/AccountReset/SecurityExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<Security>
*/
class SecurityExtension extends Extension
{
Expand Down
3 changes: 2 additions & 1 deletion src/Extension/MemberExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
* @property MethodInterface $DefaultRegisteredMethod
* @property string $DefaultRegisteredMethodID
* @property bool $HasSkippedMFARegistration
* @property Member|MemberExtension $owner
* @method HasManyList<RegisteredMethod> RegisteredMFAMethods()
*
* @extends DataExtension<Member&static>
*/
class MemberExtension extends DataExtension implements PermissionProvider
{
Expand Down
3 changes: 3 additions & 0 deletions src/Extension/RequirementsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
use SilverStripe\Core\Extension;
use SilverStripe\MFA\RequestHandler\BaseHandlerTrait;

/**
* @extends Extension<LeftAndMain>
*/
class RequirementsExtension extends Extension
{
use BaseHandlerTrait;
Expand Down
3 changes: 3 additions & 0 deletions src/Extension/SiteConfigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
use SilverStripe\Forms\OptionsetField;
use SilverStripe\ORM\DataExtension;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\View\Requirements;

/**
* Adds multi-factor authentication related settings to the SiteConfig "Access" tab
*
* @property bool $MFARequired
* @property string $MFAGracePeriodExpires
*
* @extends DataExtension<SiteConfig>
*/
class SiteConfigExtension extends DataExtension
{
Expand Down

0 comments on commit e6447ab

Please sign in to comment.