Completed
Push — master ( abcf31...a8a46d )
by thomas
28:08 queued 25:46
created

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