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

NetworkScriptPrefix::getPrivatePrefix()   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
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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