1 | <?php |
||
16 | class EmailVerificationBroker implements EmailVerificationBrokerContract |
||
17 | { |
||
18 | /** |
||
19 | * The application key. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $key; |
||
24 | |||
25 | /** |
||
26 | * The user provider implementation. |
||
27 | * |
||
28 | * @var \Illuminate\Contracts\Auth\UserProvider |
||
29 | */ |
||
30 | protected $users; |
||
31 | |||
32 | /** |
||
33 | * The number of minutes that the reset token should be considered valid. |
||
34 | * |
||
35 | * @var int |
||
36 | */ |
||
37 | protected $expiration; |
||
38 | |||
39 | /** |
||
40 | * Create a new verification broker instance. |
||
41 | * |
||
42 | * @param \Illuminate\Contracts\Auth\UserProvider $users |
||
43 | * @param string $key |
||
44 | * @param int $expiration |
||
45 | */ |
||
46 | public function __construct(UserProvider $users, $key, $expiration) |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function sendVerificationLink(array $credentials) |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | public function verify(array $credentials, Closure $callback) |
||
102 | |||
103 | /** |
||
104 | * Get the user for the given credentials. |
||
105 | * |
||
106 | * @param array $credentials |
||
107 | * |
||
108 | * @throws \UnexpectedValueException |
||
109 | * |
||
110 | * @return \Rinvex\Fort\Contracts\CanVerifyEmailContract |
||
111 | */ |
||
112 | public function getUser(array $credentials) |
||
122 | |||
123 | /** |
||
124 | * Create a new email verification token for the given user. |
||
125 | * |
||
126 | * @param \Rinvex\Fort\Contracts\CanVerifyEmailContract $user |
||
127 | * @param int $expiration |
||
128 | * |
||
129 | * @return string |
||
130 | */ |
||
131 | public function createToken(CanVerifyEmailContract $user, $expiration) |
||
137 | |||
138 | /** |
||
139 | * Validate the given email verification token. |
||
140 | * |
||
141 | * @param \Rinvex\Fort\Contracts\CanVerifyEmailContract $user |
||
142 | * @param array $credentials |
||
143 | * |
||
144 | * @return bool |
||
145 | */ |
||
146 | public function validateToken(CanVerifyEmailContract $user, array $credentials) |
||
152 | |||
153 | /** |
||
154 | * Validate the given expiration timestamp. |
||
155 | * |
||
156 | * @param int $expiration |
||
157 | * |
||
158 | * @return bool |
||
159 | */ |
||
160 | public function validateTimestamp($expiration) |
||
164 | |||
165 | /** |
||
166 | * Return the application key. |
||
167 | * |
||
168 | * @return string |
||
169 | */ |
||
170 | public function getKey() |
||
178 | |||
179 | /** |
||
180 | * Returns the payload string containing. |
||
181 | * |
||
182 | * @param \Rinvex\Fort\Contracts\CanVerifyEmailContract $user |
||
183 | * @param string $email |
||
184 | * @param int $expiration |
||
185 | * |
||
186 | * @return string |
||
187 | */ |
||
188 | protected function buildPayload(CanVerifyEmailContract $user, $email, $expiration) |
||
197 | |||
198 | /** |
||
199 | * Validate an email verification for the given credentials. |
||
200 | * |
||
201 | * @param array $credentials |
||
202 | * |
||
203 | * @return \Rinvex\Fort\Contracts\CanVerifyEmailContract|string |
||
204 | */ |
||
205 | protected function validateVerification(array $credentials) |
||
221 | } |
||
222 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: