Completed
Pull Request — master (#244)
by thomas
201:55 queued 131:14
created

WitnessProgram   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 3
c 2
b 0
f 1
lcom 0
cbo 0
dl 0
loc 39
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getVersion() 0 4 1
A getProgram() 0 4 1
1
<?php
2
3
namespace BitWasp\Bitcoin\Script;
4
5
use BitWasp\Buffertools\BufferInterface;
6
7
class WitnessProgram
8
{
9
    /**
10
     * @var int
11
     */
12
    private $version;
13
14
    /**
15
     * @var BufferInterface
16
     */
17
    private $program;
18
19
    /**
20
     * WitnessProgram constructor.
21
     * @param int $version
22
     * @param BufferInterface $program
23
     */
24
    public function __construct($version, BufferInterface $program)
25
    {
26
        $this->version = $version;
27
        $this->program = $program;
28
    }
29
30
    /**
31
     * @return int
32
     */
33
    public function getVersion()
34
    {
35
        return $this->version;
36
    }
37
38
    /**
39
     * @return BufferInterface
40
     */
41
    public function getProgram()
42
    {
43
        return $this->program;
44
    }
45
}
46