Passed
Pull Request — master (#14)
by
10:26
created

User   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 78
Duplicated Lines 100 %

Importance

Changes 0
Metric Value
wmc 7
dl 78
loc 78
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getLineUserId() 3 3 1
A getLineActiveCmd() 3 3 1
A getLineCommandData() 3 3 1
A setLineUserId() 3 3 1
A setLineActiveCmd() 3 3 1
A setLineCommandData() 3 3 1
A getId() 3 3 1

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 LineMob\Core\Mocky\Doctrine\Model;
4
5
use LineMob\Core\Storage\CommandDataInterface;
6
7
/**
8
 * @Entity
9
 * @Table(name="user")
10
 */
11 View Code Duplication
class User implements CommandDataInterface
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...
12
{
13
    /**
14
     * @Id
15
     * @GeneratedValue
16
     * @Column(type="integer")
17
     */
18
    private $id;
19
20
    /**
21
     * @Column(type="string", nullable=true)
22
     */
23
    private $lineUserId;
24
25
    /**
26
     * @Column(type="string", nullable=true)
27
     */
28
    private $lineActiveCmd;
29
30
    /**
31
     * @Column(type="array", nullable=true)
32
     */
33
    private $lineCommandData;
34
35
    /**
36
     * @return int
37
     */
38
    public function getId()
39
    {
40
        return $this->id;
41
    }
42
43
    /**
44
     * {@inheritdoc}
45
     */
46
    public function getLineUserId()
47
    {
48
        return $this->lineUserId;
49
    }
50
51
    /**
52
     * {@inheritdoc}
53
     */
54
    public function setLineUserId($lineUserId)
55
    {
56
        $this->lineUserId = $lineUserId;
57
    }
58
59
    /**
60
     * {@inheritdoc}
61
     */
62
    public function getLineActiveCmd()
63
    {
64
        return $this->lineActiveCmd;
65
    }
66
67
    /**
68
     * {@inheritdoc}
69
     */
70
    public function setLineActiveCmd($lineActiveCmd)
71
    {
72
        $this->lineActiveCmd = $lineActiveCmd;
73
    }
74
75
    /**
76
     * {@inheritdoc}
77
     */
78
    public function getLineCommandData()
79
    {
80
        return $this->lineCommandData;
81
    }
82
83
    /**
84
     * {@inheritdoc}
85
     */
86
    public function setLineCommandData(array $lineCommandData)
87
    {
88
        $this->lineCommandData = $lineCommandData;
89
    }
90
}
91