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 c1c6be9 commit 967d99d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Extensions/MemberExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

/**
* Augment `Member` to allow relationship to the LoginSession DataObject
*
* @method SilverStripe\ORM\HasManyList<LoginSession> LoginSessions()
*
* @extends DataExtension<Member>
*/
class MemberExtension extends DataExtension
{
Expand Down
4 changes: 4 additions & 0 deletions src/Extensions/QueuedJobDescriptorExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

use SilverStripe\Core\Extension;
use SilverStripe\SessionManager\Jobs\GarbageCollectionJob;
use Symbiote\QueuedJobs\DataObjects\QueuedJobDescriptor;

/**
* @extends Extension<QueuedJobDescriptor>
*/
class QueuedJobDescriptorExtension extends Extension
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Extensions/RememberLoginHashExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<RememberLoginHash>
*/
class RememberLoginHashExtension extends Extension
{
Expand Down
2 changes: 1 addition & 1 deletion src/Models/LoginSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public function isCurrent(?HTTPRequest $request = null): bool

/**
* @param Member $member
* @return DataList|LoginSession[]
* @return DataList<LoginSession>
*/
public static function getCurrentSessions(Member $member)
{
Expand Down

0 comments on commit 967d99d

Please sign in to comment.