CharacterSummary   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 71
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 71
loc 71
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getResourceURI() 4 4 1
A setResourceURI() 4 4 1
A getName() 4 4 1
A setName() 4 4 1
A getRole() 4 4 1
A setRole() 4 4 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 declare(strict_types = 1);
2
3
namespace ikoene\Marvel\Entity;
4
5
/**
6
 * Class CharacterSummary
7
 * @package ikoene\Marvel\Entity
8
 */
9 View Code Duplication
class CharacterSummary
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
     * The path to the individual character resource.
13
     *
14
     * @var string
15
     */
16
    private $resourceURI;
17
18
    /**
19
     * The full name of the character.
20
     *
21
     * @var string
22
     */
23
    private $name;
24
25
    /**
26
     * The role of the creator in the parent entity.
27
     *
28
     * @var string
29
     */
30
    private $role;
31
32
    /**
33
     * @return string
34
     */
35
    public function getResourceURI()
36
    {
37
        return $this->resourceURI;
38
    }
39
40
    /**
41
     * @param string $resourceURI
42
     */
43
    public function setResourceURI(string $resourceURI)
44
    {
45
        $this->resourceURI = $resourceURI;
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getName()
52
    {
53
        return $this->name;
54
    }
55
56
    /**
57
     * @param string $name
58
     */
59
    public function setName(string $name)
60
    {
61
        $this->name = $name;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getRole()
68
    {
69
        return $this->role;
70
    }
71
72
    /**
73
     * @param string $role
74
     */
75
    public function setRole(string $role)
76
    {
77
        $this->role = $role;
78
    }
79
}
80