Utxo   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 36
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getOutput() 0 3 1
A getOutPoint() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BitWasp\Bitcoin\Utxo;
6
7
use BitWasp\Bitcoin\Transaction\OutPoint;
8
use BitWasp\Bitcoin\Transaction\OutPointInterface;
9
use BitWasp\Bitcoin\Transaction\TransactionOutputInterface;
10
11
class Utxo implements UtxoInterface
12
{
13
    /**
14
     * @var OutPointInterface
15
     */
16
    private $outPoint;
17
18
    /**
19
     * @var TransactionOutputInterface
20
     */
21
    private $prevOut;
22
23
    /**
24
     * @param OutPointInterface $outPoint
25
     * @param TransactionOutputInterface $prevOut
26
     */
27 1
    public function __construct(OutPointInterface $outPoint, TransactionOutputInterface $prevOut)
28
    {
29 1
        $this->outPoint = $outPoint;
30 1
        $this->prevOut = $prevOut;
31 1
    }
32
33
    /**
34
     * @return OutPointInterface
35
     */
36 1
    public function getOutPoint(): OutPointInterface
37
    {
38 1
        return $this->outPoint;
39
    }
40
41
    /**
42
     * @return TransactionOutputInterface
43
     */
44 51
    public function getOutput(): TransactionOutputInterface
45
    {
46 51
        return $this->prevOut;
47
    }
48
}
49