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

ForegoneHashGenerator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 17
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A generate() 0 4 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