| 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, $config = []) |
||
| 29 | { |
||
| 30 | if (empty($token) || !is_string($token)) { |
||
| 31 | throw new InvalidArgumentException('Password reset token cannot be blank.'); |
||
| 32 | } |
||
| 33 | $this->_user = User::findByPasswordResetToken($token); |
||
| 34 | if (!$this->_user) { |
||
| 35 | throw new InvalidArgumentException('Wrong password reset token.'); |
||
| 36 | } |
||
| 37 | parent::__construct($config); |
||
| 38 | } |
||
| 65 |