Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Lines | 8 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
10 | View Code Duplication | public function testVerify() |
|
|
|||
11 | { |
||
12 | $timestamp = time(); |
||
13 | $signature = hash_hmac('sha256', "{$timestamp}:", 'secret'); |
||
14 | |||
15 | $result = Signature::verify('', "{$timestamp}:{$signature}", 'secret'); |
||
16 | self::assertTrue($result); |
||
17 | } |
||
18 | |||
34 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.