Completed
Push — master ( bd4ff0...d83768 )
by Fabian
03:55
created

Nonce   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 8
ccs 0
cts 4
cp 0
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A generate() 0 6 1
1
<?php
2
/**
3
 * @author fabian.hanisch
4
 * @since  2017-07-17
5
 */
6
7
namespace HanischIt\KrakenApi\Service\RequestService;
8
9
/**
10
 * Class Nonce
11
 *
12
 * @package HanischIt\KrakenApi\Service\RequestService
13
 */
14
class Nonce
15
{
16
    public function generate()
17
    {
18
        $nonce = explode(' ', microtime());
19
        $nonce = $nonce[1] . str_pad(substr($nonce[0], 2, 6), 6, '0');
20
21
        return $nonce;
22
    }
23
}
24