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

CheckerCreator   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\Checker;
9
use BitWasp\Bitcoin\Transaction\TransactionInterface;
10
use BitWasp\Bitcoin\Transaction\TransactionOutputInterface;
11
12
class CheckerCreator extends CheckerCreatorBase
13
{
14
    /**
15
     * @param TransactionInterface $tx
16
     * @param int $nInput
17
     * @param TransactionOutputInterface $txOut
18
     * @return CheckerBase
19
     */
20 107
    public function create(TransactionInterface $tx, int $nInput, TransactionOutputInterface $txOut): CheckerBase
21
    {
22 107
        return new Checker($this->ecAdapter, $tx, $nInput, $txOut->getValue(), $this->txSigSerializer, $this->pubKeySerializer);
23
    }
24
}
25