Completed
Pull Request — 0.0.35 (#659)
by thomas
25:40
created

NetworkScriptPrefix   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 54
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getPrivatePrefix() 0 4 1
A getPublicPrefix() 0 4 1
A getScriptDataFactory() 0 4 1
1
<?php
2
3
namespace BitWasp\Bitcoin\Key\Deterministic\HdPrefix;
4
5
use BitWasp\Bitcoin\Key\KeyToScript\ScriptDataFactory;
6
7
class NetworkScriptPrefix
8
{
9
    /**
10
     * @var string
11
     */
12
    private $privatePrefix;
13
14
    /**
15
     * @var string
16
     */
17
    private $publicPrefix;
18
19
    /**
20
     * @var ScriptDataFactory
21
     */
22
    private $scriptDataFactory;
23
24
    /**
25
     * ScriptPrefixConfig constructor.
26
     * @param ScriptDataFactory $scriptDataFactory
27
     * @param string $privatePrefix
28
     * @param string $publicPrefix
29
     */
30 1
    public function __construct(ScriptDataFactory $scriptDataFactory, $privatePrefix, $publicPrefix)
31
    {
32 1
        $this->scriptDataFactory = $scriptDataFactory;
33 1
        $this->publicPrefix = $publicPrefix;
34 1
        $this->privatePrefix = $privatePrefix;
35 1
    }
36
37
    /**
38
     * @return string
39
     */
40 1
    public function getPrivatePrefix()
41
    {
42 1
        return $this->privatePrefix;
43
    }
44
45
    /**
46
     * @return string
47
     */
48 1
    public function getPublicPrefix()
49
    {
50 1
        return $this->publicPrefix;
51
    }
52
53
    /**
54
     * @return ScriptDataFactory
55
     */
56 1
    public function getScriptDataFactory()
57
    {
58 1
        return $this->scriptDataFactory;
59
    }
60
}
61