TransactionResult::getErrorMessage()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: WilliamWard
5
 * Date: 8/6/2018
6
 * Time: 10:49 AM
7
 */
8
9
namespace GivePay\Gateway;
10
11
final class TransactionResult
12
{
13
    private $success;
14
    private $transaction_id;
15
    private $error_message;
16
    private $code;
17
18
    public function __construct($success, $transaction_id = null, $error_message = null, $code = null)
19
    {
20
        $this->success = $success;
21
        $this->transaction_id = $transaction_id;
22
        $this->error_message = $error_message;
23
        $this->code = $code;
24
    }
25
26
    /**
27
     * @return bool
28
     */
29
    public function getSuccess()
30
    {
31
        return $this->success;
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function getTransactionId()
38
    {
39
        return $this->transaction_id;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getErrorMessage()
46
    {
47
        return $this->error_message;
48
    }
49
50
    /**
51
     * @return string
52
     */
53
    public function getCode()
54
    {
55
        return $this->code;
56
    }
57
}