GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( b98016...0803ae )
by Mohamed
40:16 queued 14:56
created

Link   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 123
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 10
lcom 0
cbo 1
dl 123
loc 123
ccs 0
cts 45
cp 0
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 4 4 1
A setId() 6 6 1
A getArticleId() 4 4 1
A setArticleId() 6 6 1
A getName() 4 4 1
A setName() 6 6 1
A getLink() 4 4 1
A setLink() 6 6 1
A getTarget() 4 4 1
A setTarget() 6 6 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
 * Neta\Shopware\SDK\Entity.
4
 *
5
 * Copyright 2016 LeadCommerce
6
 *
7
 * @author    Alexander Mahrt <[email protected]>
8
 * @copyright 2016 LeadCommerce <[email protected]>
9
 */
10
11
namespace Neta\Shopware\SDK\Entity;
12
13
/**
14
 * Class Link.
15
 */
16 View Code Duplication
class Link extends Base
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...
17
{
18
    /**
19
     * @var int
20
     */
21
    protected $id;
22
    /**
23
     * @var int
24
     */
25
    protected $articleId;
26
    /**
27
     * @var string
28
     */
29
    protected $name;
30
    /**
31
     * @var string
32
     */
33
    protected $link;
34
    /**
35
     * @var string
36
     */
37
    protected $target;
38
39
    /**
40
     * @return int
41
     */
42
    public function getId()
43
    {
44
        return $this->id;
45
    }
46
47
    /**
48
     * @param int $id
49
     *
50
     * @return Link
51
     */
52
    public function setId($id)
53
    {
54
        $this->id = $id;
55
56
        return $this;
57
    }
58
59
    /**
60
     * @return int
61
     */
62
    public function getArticleId()
63
    {
64
        return $this->articleId;
65
    }
66
67
    /**
68
     * @param int $articleId
69
     *
70
     * @return Link
71
     */
72
    public function setArticleId($articleId)
73
    {
74
        $this->articleId = $articleId;
75
76
        return $this;
77
    }
78
79
    /**
80
     * @return string
81
     */
82
    public function getName()
83
    {
84
        return $this->name;
85
    }
86
87
    /**
88
     * @param string $name
89
     *
90
     * @return Link
91
     */
92
    public function setName($name)
93
    {
94
        $this->name = $name;
95
96
        return $this;
97
    }
98
99
    /**
100
     * @return string
101
     */
102
    public function getLink()
103
    {
104
        return $this->link;
105
    }
106
107
    /**
108
     * @param string $link
109
     *
110
     * @return Link
111
     */
112
    public function setLink($link)
113
    {
114
        $this->link = $link;
115
116
        return $this;
117
    }
118
119
    /**
120
     * @return string
121
     */
122
    public function getTarget()
123
    {
124
        return $this->target;
125
    }
126
127
    /**
128
     * @param string $target
129
     *
130
     * @return Link
131
     */
132
    public function setTarget($target)
133
    {
134
        $this->target = $target;
135
136
        return $this;
137
    }
138
}
139