From 967d99d133360a892d037baa3de92c9ced64e633 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Thu, 11 Jan 2024 16:07:33 +1300 Subject: [PATCH] ENH Add generic types --- src/Extensions/MemberExtension.php | 3 +++ src/Extensions/QueuedJobDescriptorExtension.php | 4 ++++ src/Extensions/RememberLoginHashExtension.php | 3 +++ src/Models/LoginSession.php | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Extensions/MemberExtension.php b/src/Extensions/MemberExtension.php index 34e4a9e..9bd9ac8 100644 --- a/src/Extensions/MemberExtension.php +++ b/src/Extensions/MemberExtension.php @@ -10,7 +10,10 @@ /** * Augment `Member` to allow relationship to the LoginSession DataObject + * * @method SilverStripe\ORM\HasManyList LoginSessions() + * + * @extends DataExtension */ class MemberExtension extends DataExtension { diff --git a/src/Extensions/QueuedJobDescriptorExtension.php b/src/Extensions/QueuedJobDescriptorExtension.php index 3e2f479..5bbb82d 100644 --- a/src/Extensions/QueuedJobDescriptorExtension.php +++ b/src/Extensions/QueuedJobDescriptorExtension.php @@ -4,7 +4,11 @@ use SilverStripe\Core\Extension; use SilverStripe\SessionManager\Jobs\GarbageCollectionJob; +use Symbiote\QueuedJobs\DataObjects\QueuedJobDescriptor; +/** + * @extends Extension + */ class QueuedJobDescriptorExtension extends Extension { /** diff --git a/src/Extensions/RememberLoginHashExtension.php b/src/Extensions/RememberLoginHashExtension.php index b72d0cf..5e922f4 100644 --- a/src/Extensions/RememberLoginHashExtension.php +++ b/src/Extensions/RememberLoginHashExtension.php @@ -5,11 +5,14 @@ use SilverStripe\Control\HTTPRequest; use SilverStripe\Core\Extension; use SilverStripe\Core\Injector\Injector; +use SilverStripe\Security\RememberLoginHash; use SilverStripe\SessionManager\Models\LoginSession; use SilverStripe\SessionManager\Security\LogInAuthenticationHandler; /** * @method LoginSession LoginSession() + * + * @extends Extension */ class RememberLoginHashExtension extends Extension { diff --git a/src/Models/LoginSession.php b/src/Models/LoginSession.php index e8f8665..3900823 100644 --- a/src/Models/LoginSession.php +++ b/src/Models/LoginSession.php @@ -292,7 +292,7 @@ public function isCurrent(?HTTPRequest $request = null): bool /** * @param Member $member - * @return DataList|LoginSession[] + * @return DataList */ public static function getCurrentSessions(Member $member) {