Completed
Pull Request — master (#159)
by
unknown
09:00
created

Condition   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 55
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 2
Metric Value
wmc 4
c 3
b 0
f 2
lcom 0
cbo 1
dl 55
loc 55
ccs 10
cts 10
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 4 4 1
A getUrl() 4 4 1
A setType() 5 5 1
A setUrl() 5 5 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 Yandex\Metrica\Management\Models;
4
5
use Yandex\Common\Model;
6
7 View Code Duplication
class Condition extends Model
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...
8
{
9
10
    protected $type = null;
11
12
    protected $url = null;
13
14
    protected $mappingClasses = [];
15
16
    protected $propNameMap = [];
17
18
    /**
19
     * Retrieve the type property
20
     *
21
     * @return string|null
22
     */
23 5
    public function getType()
24
    {
25 5
        return $this->type;
26
    }
27
28
    /**
29
     * Set the type property
30
     *
31
     * @param string $type
32
     * @return $this
33
     */
34 1
    public function setType($type)
35
    {
36 1
        $this->type = $type;
37 1
        return $this;
38
    }
39
40
    /**
41
     * Retrieve the url property
42
     *
43
     * @return string|null
44
     */
45 5
    public function getUrl()
46
    {
47 5
        return $this->url;
48
    }
49
50
    /**
51
     * Set the url property
52
     *
53
     * @param string $url
54
     * @return $this
55
     */
56 1
    public function setUrl($url)
57
    {
58 1
        $this->url = $url;
59 1
        return $this;
60
    }
61
}
62