Skip to content

Commit

Permalink
Merge pull request #10 from ryinner/patch-1
Browse files Browse the repository at this point in the history
Update ManagerFactory: add guard interface magic methods && generic for user class
  • Loading branch information
sinbadxiii authored Oct 31, 2024
2 parents 0f51a12 + 1132add commit cd17657
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/ManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
/**
* Class Factory
* @package Sinbadxiii\PhalconAuth
*
* @template UserModel of class-string<AuthenticatableInterface>
* @method UserModel user()
* @method int id()
* @method bool guest()
* @method bool check()
* @method bool validate(array $credentials = [])
* @method void setUser(AuthenticatableInterface $user);
*/
class ManagerFactory extends Manager implements EventsAwareInterface
{
Expand Down Expand Up @@ -256,4 +264,4 @@ public function setEventsManager(EventsManagerInterface $eventsManager): void
{
$this->eventsManager = $eventsManager;
}
}
}

0 comments on commit cd17657

Please sign in to comment.