Passed
Push — master ( b43503...eabfa3 )
by Petr
08:15
created

ForegoneHashGenerator::generate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace AppBundle\Service;
4
5
/**
6
 * @author Vehsamrak
7
 */
8
class ForegoneHashGenerator extends HashGenerator
9
{
10
11
    /** @var string */
12
    private static $hash;
13
14 2
    public function __construct(string $hash)
15
    {
16 2
        self::$hash = $hash;
17 2
    }
18
19 2
    public static function generate(int $length = 8): string
20
    {
21 2
        return self::$hash;
22
    }
23
24
}
25