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

Deal   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 79
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 79
loc 79
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A createInstance() 10 10 2

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

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