Customer
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 49
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 0
lcom 0
cbo 3
dl 49
loc 49
c 0
b 0
f 0

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 linkprofit\AmoCRM\entities;
4
5
use linkprofit\AmoCRM\traits\CompanyLinkable;
6
use linkprofit\AmoCRM\traits\ContactsLinkable;
7
8
/**
9
 * Class Customer
10
 * @package linkprofit\AmoCRM\entities
11
 */
12 View Code Duplication
class Customer extends CustomizableEntity
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...
13
{
14
    /**
15
     * @var string Название покупателя
16
     */
17
    public $name;
18
19
    /**
20
     * @var string Дата и время следующей покупки
21
     */
22
    public $next_date;
23
24
    /**
25
     * @var integer id пользователя создавшего покупателя
26
     */
27
    public $created_by;
28
29
    /**
30
     * @var integer Ожидаемая сумма
31
     */
32
    public $next_price;
33
34
    /**
35
     * @var integer Периодичность совершаемых покупок
36
     */
37
    public $periodicity;
38
39
    /**
40
     * @var string Если вы хотите задать новые теги, перечислите их внутри строковой переменной через запятую
41
     */
42
    public $tags;
43
44
    /**
45
     * @var integer id периода цифровой воронки покупателя
46
     */
47
    public $period_id;
48
49
    /**
50
     * @var array
51
     */
52
    protected $fieldList = [
53
        'id', 'name', 'next_date', 'created_at', 'updated_at',
54
        'responsible_user_id', 'created_by', 'next_price',
55
        'periodicity', 'tags', 'period_id', 'contacts_id', 'company_id'
56
    ];
57
58
    use CompanyLinkable,
59
        ContactsLinkable;
60
}