RelationshipDummy   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 70
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
c 1
b 0
f 0
lcom 0
cbo 0
dl 70
loc 70
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getFoo() 4 4 1
A setFoo() 4 4 1
A getBar() 4 4 1
A setBar() 4 4 1
A getFooBar() 4 4 1
A setFooBar() 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
2
/*
3
 * This file is part of AppBundle the package.
4
 *
5
 * (c) Ruslan Muriev <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace RonteLtd\JsonApiBundle\Tests\Fixtures;
12
13
use RonteLtd\JsonApiBundle\Annotation\Relationship;
14
15
/**
16
 * Class RelationshipDummy
17
 *
18
 * @package RonteLtd\JsonApiBundle\Tests\Fixtures
19
 * @author Ruslan Muriev <[email protected]>
20
 */
21 View Code Duplication
class RelationshipDummy
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...
22
{
23
    /**
24
     * @Relationship(name="a")
25
     *
26
     * @var
27
     */
28
    private $foo;
29
30
    /**
31
     * @Relationship
32
     *
33
     * @var
34
     */
35
    private $bar;
36
37
    /**
38
     * @var
39
     */
40
    private $fooBar;
41
42
43
    /**
44
     * @return mixed
45
     */
46
    public function getFoo()
47
    {
48
        return $this->foo;
49
    }
50
51
    /**
52
     * @param mixed $foo
53
     */
54
    public function setFoo($foo)
55
    {
56
        $this->foo = $foo;
57
    }
58
59
    /**
60
     * @return mixed
61
     */
62
    public function getBar()
63
    {
64
        return $this->bar;
65
    }
66
67
    /**
68
     * @param mixed $bar
69
     */
70
    public function setBar($bar)
71
    {
72
        $this->bar = $bar;
73
    }
74
75
    /**
76
     * @return mixed
77
     */
78
    public function getFooBar()
79
    {
80
        return $this->fooBar;
81
    }
82
83
    /**
84
     * @param mixed $fooBar
85
     */
86
    public function setFooBar($fooBar)
87
    {
88
        $this->fooBar = $fooBar;
89
    }
90
}