Passed
Pull Request — master (#2)
by Andreas
11:41
created

ThreedSecureAuthenticateTransaction::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Larium\Pay\Transaction;
6
7
class ThreedSecureAuthenticateTransaction implements ThreedSecureAuthenticate
8
{
9
    use Commit;
10
11
    private $pares;
12
13
    private $transactionId;
14
15 1
    public function __construct($pares, $transactionId)
16
    {
17 1
        $this->pares = $pares;
18 1
        $this->transactionId = $transactionId;
19
    }
20
21
    public function getPares()
22
    {
23
        return $this->pares;
24
    }
25
26
    public function getTransactionId()
27
    {
28
        return $this->transactionId;
29
    }
30
31
    public function canCommit()
32
    {
33
        return $this->pares
34
            && $this->transactionId;
35
    }
36
}
37