Completed
Push — master ( 50beb4...e5dc16 )
by
unknown
03:58
created

Transaction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 68
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 68
rs 10
c 1
b 1
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A createInstance() 0 10 2
1
<?php
2
3
namespace Padosoft\AffiliateNetwork;
4
5
/**
6
 * Class Transaction
7
 * @package Padosoft\AffiliateNetwork
8
 */
9
class Transaction
10
{
11
    /**
12
     * @var string
13
     */
14
    public $currency = '';
15
16
    /**
17
     * @var string
18
     */
19
    public $status = '';
20
21
    /**
22
     * @var float
23
     */
24
    public $amount = 0.00;
25
26
    /**
27
     * @var string
28
     */
29
    public $custom_ID = '';
30
31
    /**
32
     * @var string
33
     */
34
    public $title = '';
35
36
    /**
37
     * @var string
38
     */
39
    public $unique_ID = '';
40
41
    /**
42
     * @var double
43
     */
44
    public $commission = 0.00;
45
46
    /**
47
     * @var string
48
     */
49
    public $date = '';
50
51
    /**
52
     * @var int
53
     */
54
    public $merchant_ID = 0;
55
56
    /**
57
     * @var boolean
58
     */
59
    public $approved = false;
60
61
    /**
62
     * @method createInstance
63
     * @return obj istance
64
     */
65
    public static function createInstance()
66
    {
67
        $obj = null;
68
        try {
69
            $obj = new Transaction();
70
        } catch (\Exception $e) {
71
            throw new \Exception('Error creating instance Transaction - ' . $e->getMessage());
72
        }
73
        return $obj;
74
    }
75
76
}
77