Code Duplication    Length = 74-79 lines in 2 locations

src/Deal.php 1 location

@@ 9-87 (lines=79) @@
6
 * Class Deal
7
 * @package Padosoft\AffiliateNetwork
8
 */
9
class Deal
10
{
11
    /**
12
     * @var int
13
     */
14
    public $merchant_ID=0;
15
16
    /**
17
     * @var int
18
     */
19
    public $network_ID=0;
20
21
    /**
22
     * @var int
23
     */
24
    public $type=0;
25
26
    /**
27
     * @var string
28
     */
29
    public $code='';
30
31
    /**
32
     * @var string
33
     */
34
    public $url='';
35
36
    /**
37
     * @var \DateTime
38
     */
39
    public $startDate;
40
41
    /**
42
     * @var \DateTime
43
     */
44
    public $endDate;
45
46
    /**
47
     * @var integer
48
     */
49
    public $deal_ID = 0;
50
51
    /**
52
     * @var string
53
     */
54
    public $name = '';
55
56
    /**
57
     * @var string
58
     */
59
    public $deal_type = '';
60
61
    /**
62
     * @var string
63
     */
64
    public $ppv = '';
65
66
    /**
67
     * @var string
68
     */
69
    public $ppc = '';
70
71
    /**
72
     * @method createInstance
73
     * @return obj istance
74
     */
75
    public static function createInstance()
76
    {
77
        $obj = null;
78
        try {
79
            $obj = new Deal();
80
        } catch (\Exception $e) {
81
            throw new \Exception('Error creating instance Deal - ' . $e->getMessage());
82
        }
83
        return $obj;
84
    }
85
86
87
}
88

src/Transaction.php 1 location

@@ 9-82 (lines=74) @@
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
     * @var array
63
     */
64
    public $reportItems = array();
65
66
67
    /**
68
     * @method createInstance
69
     * @return obj istance
70
     */
71
    public static function createInstance()
72
    {
73
        $obj = null;
74
        try {
75
            $obj = new Transaction();
76
        } catch (\Exception $e) {
77
            throw new \Exception('Error creating instance Transaction - ' . $e->getMessage());
78
        }
79
        return $obj;
80
    }
81
82
}
83