Skip to content

Commit 5979144

Browse files
cursoragentanwarx4u
andcommitted
Add IDE method annotations to MFA Laravel Facade
Co-authored-by: anwarx4u <anwarx4u@gmail.com>
1 parent 0eded41 commit 5979144

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/Facades/MFA.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,33 @@
44

55
use Illuminate\Support\Facades\Facade;
66

7+
/**
8+
* Laravel Facade for the MFA service.
9+
*
10+
* Adding explicit method annotations here allows IDEs (PHPStorm, Intelephense)
11+
* to provide static autocompletion when calling methods like MFA::setupTotp().
12+
*
13+
* @method static array setupTotp(\Illuminate\Contracts\Auth\Authenticatable $user, ?string $issuer = null, ?string $label = null)
14+
* @method static bool verifyTotp(\Illuminate\Contracts\Auth\Authenticatable $user, string $code)
15+
* @method static ?\CodingLibs\MFA\Models\MfaChallenge issueChallenge(\Illuminate\Contracts\Auth\Authenticatable $user, string $method)
16+
* @method static void registerChannel(\CodingLibs\MFA\Contracts\MfaChannel $channel)
17+
* @method static ?string generateTotpQrCodeBase64(\Illuminate\Contracts\Auth\Authenticatable $user, ?string $issuer = null, ?string $label = null, int $size = 200)
18+
* @method static bool verifyChallenge(\Illuminate\Contracts\Auth\Authenticatable $user, string $method, string $code)
19+
* @method static bool isRememberEnabled()
20+
* @method static string getRememberCookieName()
21+
* @method static ?string getRememberTokenFromRequest(\Illuminate\Http\Request $request)
22+
* @method static bool shouldSkipVerification(\Illuminate\Contracts\Auth\Authenticatable $user, ?string $token)
23+
* @method static array rememberDevice(\Illuminate\Contracts\Auth\Authenticatable $user, ?int $lifetimeDays = null, ?string $deviceName = null)
24+
* @method static \Symfony\Component\HttpFoundation\Cookie makeRememberCookie(string $token, ?int $lifetimeDays = null)
25+
* @method static int forgetRememberedDevice(\Illuminate\Contracts\Auth\Authenticatable $user, string $token)
26+
* @method static \CodingLibs\MFA\Models\MfaMethod enableMethod(\Illuminate\Contracts\Auth\Authenticatable $user, string $method, array $attributes = [])
27+
* @method static bool disableMethod(\Illuminate\Contracts\Auth\Authenticatable $user, string $method)
28+
* @method static bool isEnabled(\Illuminate\Contracts\Auth\Authenticatable $user, string $method)
29+
* @method static ?\CodingLibs\MFA\Models\MfaMethod getMethod(\Illuminate\Contracts\Auth\Authenticatable $user, string $method)
30+
*
31+
* @mixin \CodingLibs\MFA\MFA
32+
* @see \CodingLibs\MFA\MFA
33+
*/
734
class MFA extends Facade
835
{
936
protected static function getFacadeAccessor(): string

0 commit comments

Comments
 (0)