Completed
Pull Request — 0.0.35 (#660)
by thomas
22:22
created

RawKeyParams::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 6
dl 0
loc 9
ccs 8
cts 8
cp 1
crap 1
rs 9.6666
c 0
b 0
f 0
1
<?php
2
3
namespace BitWasp\Bitcoin\Serializer\Key\HierarchicalKey;
4
5
use BitWasp\Buffertools\BufferInterface;
6
7
class RawKeyParams
8
{
9
    /**
10
     * @var string
11
     */
12
    private $prefix;
13
14
    /**
15
     * @var int
16
     */
17
    private $depth;
18
19
    /**
20
     * @var int
21
     */
22
    private $parentFpr;
23
24
    /**
25
     * @var int
26
     */
27
    private $sequence;
28
29
    /**
30
     * @var BufferInterface
31
     */
32
    private $chainCode;
33
34
    /**
35
     * @var BufferInterface
36
     */
37
    private $keyData;
38
39
    /**
40
     * RawKeyParams constructor.
41
     * @param string $prefix
42
     * @param int $depth
43
     * @param int $parentFingerprint
44
     * @param int $sequence
45
     * @param BufferInterface $chainCode
46
     * @param BufferInterface $keyData
47
     */
48 57
    public function __construct($prefix, $depth, $parentFingerprint, $sequence, BufferInterface $chainCode, BufferInterface $keyData)
49
    {
50 57
        $this->prefix = $prefix;
51 57
        $this->depth = $depth;
52 57
        $this->parentFpr = $parentFingerprint;
53 57
        $this->sequence = $sequence;
54 57
        $this->chainCode = $chainCode;
55 57
        $this->keyData = $keyData;
56 57
    }
57
58
    /**
59
     * @return string
60
     */
61 57
    public function getPrefix()
62
    {
63 57
        return $this->prefix;
64
    }
65
66
    /**
67
     * @return int
68
     */
69 56
    public function getDepth()
70
    {
71 56
        return $this->depth;
72
    }
73
74
    /**
75
     * @return int
76
     */
77 56
    public function getParentFingerprint()
78
    {
79 56
        return $this->parentFpr;
80
    }
81
82
    /**
83
     * @return int
84
     */
85 56
    public function getSequence()
86
    {
87 56
        return $this->sequence;
88
    }
89
90
    /**
91
     * @return BufferInterface
92
     */
93 56
    public function getChainCode()
94
    {
95 56
        return $this->chainCode;
96
    }
97
98
    /**
99
     * @return BufferInterface
100
     */
101 56
    public function getKeyData()
102
    {
103 56
        return $this->keyData;
104
    }
105
}
106