| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3.009 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | 2 | public function authorize() |
|
| 16 | { |
||
| 17 | 2 | if (! hash_equals( |
|
| 18 | 2 | (string) $this->route('id'), |
|
| 19 | 2 | sha1($this->user()->getKeyForVerification() |
|
| 20 | ))) { |
||
| 21 | return false; |
||
| 22 | } |
||
| 23 | |||
| 24 | 2 | if (! hash_equals( |
|
| 25 | 2 | (string) $this->route('hash'), |
|
| 26 | 2 | sha1($this->user()->getEmailForVerification() |
|
| 27 | ))) { |
||
| 28 | 1 | return false; |
|
| 29 | } |
||
| 30 | |||
| 31 | 1 | return true; |
|
| 32 | } |
||
| 34 |