Completed
Push — 1.x ( 084efb...fac983 )
by Joel
02:47
created

PullInfo   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 99
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getError() 4 4 1
A setError() 6 6 1
A getStatus() 4 4 1
A setStatus() 6 6 1
A getProgress() 4 4 1
A setProgress() 6 6 1
A getProgressDetail() 4 4 1
A setProgressDetail() 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
namespace Docker\API\Model;
4
5 View Code Duplication
class PullInfo
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...
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $error;
11
    /**
12
     * @var string
13
     */
14
    protected $status;
15
    /**
16
     * @var string
17
     */
18
    protected $progress;
19
    /**
20
     * @var ProgressDetail
21
     */
22
    protected $progressDetail;
23
24
    /**
25
     * @return string
26
     */
27
    public function getError()
28
    {
29
        return $this->error;
30
    }
31
32
    /**
33
     * @param string $error
34
     *
35
     * @return self
36
     */
37
    public function setError($error = null)
38
    {
39
        $this->error = $error;
40
41
        return $this;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getStatus()
48
    {
49
        return $this->status;
50
    }
51
52
    /**
53
     * @param string $status
54
     *
55
     * @return self
56
     */
57
    public function setStatus($status = null)
58
    {
59
        $this->status = $status;
60
61
        return $this;
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getProgress()
68
    {
69
        return $this->progress;
70
    }
71
72
    /**
73
     * @param string $progress
74
     *
75
     * @return self
76
     */
77
    public function setProgress($progress = null)
78
    {
79
        $this->progress = $progress;
80
81
        return $this;
82
    }
83
84
    /**
85
     * @return ProgressDetail
86
     */
87
    public function getProgressDetail()
88
    {
89
        return $this->progressDetail;
90
    }
91
92
    /**
93
     * @param ProgressDetail $progressDetail
94
     *
95
     * @return self
96
     */
97
    public function setProgressDetail(ProgressDetail $progressDetail = null)
98
    {
99
        $this->progressDetail = $progressDetail;
100
101
        return $this;
102
    }
103
}
104