Skip to content

Commit

Permalink
Add phpstan- prefix to annotations which are not supported by IDE yet
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar committed Dec 3, 2020
1 parent 3787811 commit 003ae0a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Authentication/BaseFirewall.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
use Orisai\Exceptions\Message;

/**
* @template T of Identity
* @implements Firewall<T>
* @phpstan-template T of Identity
* @phpstan-implements Firewall<T>
*/
abstract class BaseFirewall implements Firewall
{
Expand Down
8 changes: 4 additions & 4 deletions src/Authentication/Firewall.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Orisai\Auth\Authentication\Exception\CannotSetExpiration;

/**
* @template T of Identity
* @phpstan-template T of Identity
*/
interface Firewall
{
Expand All @@ -24,20 +24,20 @@ interface Firewall
public function isLoggedIn(): bool;

/**
* @param T $identity
* @phpstan-param T $identity
*/
public function login(Identity $identity): void;

/**
* @param T $identity
* @phpstan-param T $identity
* @throws CannotRenewIdentity When user is not logged id
*/
public function renewIdentity(Identity $identity): void;

public function logout(): void;

/**
* @return T
* @phpstan-return T
* @throws CannotAccessIdentity When user is not logged id
*/
public function getIdentity(): Identity;
Expand Down
4 changes: 2 additions & 2 deletions src/Authentication/IdentityRenewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
namespace Orisai\Auth\Authentication;

/**
* @template T of Identity
* @phpstan-template T of Identity
*/
interface IdentityRenewer
{

/**
* @return T|null
* @phpstan-return T|null
*/
public function renewIdentity(Identity $identity): ?Identity;

Expand Down

0 comments on commit 003ae0a

Please sign in to comment.