Completed
Push — 0.0.35 ( b2fc74...d8d049 )
by thomas
28:12 queued 09:10
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
namespace BitWasp\Bitcoin\Transaction\Factory\Checker;
4
5
use BitWasp\Bitcoin\Script\Interpreter\CheckerBase;
6
use BitWasp\Bitcoin\Script\Interpreter\Checker;
7
use BitWasp\Bitcoin\Transaction\TransactionInterface;
8
use BitWasp\Bitcoin\Transaction\TransactionOutputInterface;
9
10
class CheckerCreator extends CheckerCreatorBase
11
{
12
    /**
13
     * @param TransactionInterface $tx
14
     * @param int $nInput
15
     * @param TransactionOutputInterface $txOut
16
     * @return CheckerBase
17
     */
18 60
    public function create(TransactionInterface $tx, $nInput, TransactionOutputInterface $txOut)
19
    {
20 60
        return new Checker($this->ecAdapter, $tx, $nInput, $txOut->getValue(), $this->txSigSerializer, $this->pubKeySerializer);
21
    }
22
}
23