Conditions | 4 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function __construct($token, array $config = []) |
||
29 | { |
||
30 | if (empty($token) || !is_string($token)) { |
||
31 | throw new InvalidArgumentException('Verify email token cannot be blank.'); |
||
32 | } |
||
33 | $this->user = User::findByVerificationToken($token); |
||
34 | if (!$this->user) { |
||
35 | throw new InvalidArgumentException('Wrong verify email token.'); |
||
36 | } |
||
37 | parent::__construct($config); |
||
38 | } |
||
52 |