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

ThreedSecureAuthenticateTransaction   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 30%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 10
c 1
b 0
f 0
dl 0
loc 28
ccs 3
cts 10
cp 0.3
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getPares() 0 3 1
A getTransactionId() 0 3 1
A __construct() 0 4 1
A canCommit() 0 4 2
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