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

CheckerCreator::create()   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 3
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\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