Passed
Push — 4.x ( ae9b80...4b47a6 )
by Hari
01:36 queued 11s
created

Randval::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
/**
3
 *
4
 * This file is part of Aura for PHP.
5
 *
6
 * @license http://opensource.org/licenses/bsd-license.php BSD
7
 *
8
 */
9
namespace Aura\Session;
10
11
use Aura\Session\Exception;
12
13
/**
14
 *
15
 * Generates cryptographically-secure random values.
16
 *
17
 * @package Aura.Session
18
 *
19
 */
20
class Randval implements RandvalInterface
21
{
22
    /**
23
     *
24
     * Returns a cryptographically secure random value.
25
     *
26
     * @return string
27
     *
28
     */
29
    public function generate()
30
    {
31
        return random_bytes(32);
32
    }
33
}
34