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

Nonce::generate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 1
b 0
f 0
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