| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function validateEmail($attribute) |
||
| 30 | { |
||
| 31 | $user = $this->getUser(); |
||
| 32 | if (!$user) { |
||
| 33 | $this->addError($attribute, 'There is no user with this email address.'); |
||
| 34 | return; |
||
| 35 | } |
||
| 36 | if ($user->isActive()) { |
||
| 37 | $this->addError($attribute, 'The email was verified.'); |
||
| 38 | return; |
||
| 39 | } |
||
| 80 |