Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.0416 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 2 | public function authorize() |
|
20 | { |
||
21 | 2 | if (! hash_equals((string) $this->user('admin')->getKey(), (string) $this->route('id'))) { |
|
22 | return false; |
||
23 | } |
||
24 | |||
25 | 2 | if (! hash_equals(sha1($this->user('admin')->getEmailForVerification()), (string) $this->route('hash'))) { |
|
26 | 1 | return false; |
|
27 | } |
||
28 | |||
29 | 1 | return true; |
|
30 | } |
||
68 |