Passed
Push — master ( 80a2af...b754d5 )
by Fabian
51s
created

Nonce   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 8
ccs 4
cts 4
cp 1
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 1
    public function generate()
17
    {
18 1
        $nonce = explode(' ', microtime());
19 1
        $nonce = $nonce[1] . str_pad(substr($nonce[0], 2, 6), 6, '0');
20
21 1
        return $nonce;
22
    }
23
}
24