Skip to content

Commit

Permalink
Update ManagerFactory.php: add guard interface magic methods && gener…
Browse files Browse the repository at this point in the history
…ic for user class

Add ide support for magic __call from manager and generic for user() return type
  • Loading branch information
ryinner authored Oct 31, 2024
1 parent 0f51a12 commit 7b86f4f
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 7b86f4f

Please sign in to comment.