sendVerificationLink()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Rinvex\Auth\Contracts;
6
7
use Closure;
8
9
interface EmailVerificationBrokerContract
10
{
11
    /**
12
     * Constant representing a successfully sent verification email.
13
     *
14
     * @var string
15
     */
16
    const LINK_SENT = 'messages.verification.email.link_sent';
17
18
    /**
19
     * Constant representing a successfully verified email.
20
     *
21
     * @var string
22
     */
23
    const EMAIL_VERIFIED = 'messages.verification.email.verified';
24
25
    /**
26
     * Constant representing an invalid user.
27
     *
28
     * @var string
29
     */
30
    const INVALID_USER = 'messages.verification.email.invalid_user';
31
32
    /**
33
     * Constant representing an invalid token.
34
     *
35
     * @var string
36
     */
37
    const INVALID_TOKEN = 'messages.verification.email.invalid_token';
38
39
    /**
40
     * Constant representing an expired token.
41
     *
42
     * @var string
43
     */
44
    const EXPIRED_TOKEN = 'messages.verification.email.expired_token';
45
46
    /**
47
     * Send a user email verification.
48
     *
49
     * @param array $credentials
50
     *
51
     * @return string
52
     */
53
    public function sendVerificationLink(array $credentials): string;
54
55
    /**
56
     * Verify given account.
57
     *
58
     * @param array         $credentials
59
     * @param \Closure|null $callback
0 ignored issues
show
Documentation introduced by
Consider making the type for parameter $callback a bit more specific; maybe use Closure.
Loading history...
60
     *
61
     * @return mixed
62
     */
63
    public function verify(array $credentials, Closure $callback);
64
}
65