Completed
Push — master ( 8abc4c...257aca )
by
unknown
01:57
created

Deal::createInstance()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 7

Duplication

Lines 10
Ratio 100 %

Importance

Changes 0
Metric Value
dl 10
loc 10
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 7
nc 2
nop 0
1
<?php
2
3
namespace Padosoft\AffiliateNetwork;
4
5
/**
6
 * Class Deal
7
 * @package Padosoft\AffiliateNetwork
8
 */
9 View Code Duplication
class Deal
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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