Completed
Push — master ( cc9f4e...3a552b )
by thomas
38:55 queued 36:36
created

BitcoinCashCheckerCreator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BitWasp\Bitcoin\Transaction\Factory\Checker;
6
7
use BitWasp\Bitcoin\Script\Interpreter\CheckerBase;
8
use BitWasp\Bitcoin\Script\Interpreter\BitcoinCashChecker;
9
use BitWasp\Bitcoin\Script\Interpreter\Checker;
10
use BitWasp\Bitcoin\Transaction\TransactionInterface;
11
use BitWasp\Bitcoin\Transaction\TransactionOutputInterface;
12
13
class BitcoinCashCheckerCreator extends CheckerCreator
14
{
15
    /**
16
     * @param TransactionInterface $tx
17
     * @param int $nInput
18
     * @param TransactionOutputInterface $txOut
19
     * @return Checker
20
     */
21 1
    public function create(TransactionInterface $tx, int $nInput, TransactionOutputInterface $txOut): CheckerBase
22
    {
23 1
        return new BitcoinCashChecker($this->ecAdapter, $tx, $nInput, $txOut->getValue(), $this->txSigSerializer, $this->pubKeySerializer);
24
    }
25
}
26