PatientDIA   A
last analyzed

Complexity

Total Complexity 15

Size/Duplication

Total Lines 189
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

15 Methods

Rating   Name   Duplication   Size   Complexity  
A getAktywnoscFizyczna() 4 4 1
A getHigiena() 4 4 1
A getOdzywianie() 4 4 1
A getWydalanie() 4 4 1
A getPomiarParametrowZyciowych() 4 4 1
A getLeczenie() 4 4 1
A getEdukacjaZdrowotnaIOpiekaPsychospoleczna() 4 4 1
A setAktywnoscFizyczna() 5 5 1
A setHigiena() 5 5 1
A setOdzywianie() 5 5 1
A setWydalanie() 5 5 1
A setPomiarParametrowZyciowych() 5 5 1
A setLeczenie() 5 5 1
A setEdukacjaZdrowotnaIOpiekaPsychospoleczna() 5 5 1
A getFields() 14 14 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
 * PatientZZ
4
 *
5
 * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
6
 * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
7
 *
8
 * Permission is hereby granted to use or copy this program
9
 * for any purpose, provided the above notices are retained on all copies.
10
 * Permission to modify the code and to distribute modified code is granted,
11
 * provided the above notices are retained, and a notice that the code was
12
 * modified is included with the above copyright notice.
13
 *
14
 * @category  Wp
15
 * @package   Punction
16
 * @author    Andrzej Marcinkowski <[email protected]>
17
 * @copyright 2014 Wojewódzki Szpital Zespolony, Kalisz
18
 * @license   MIT http://opensource.org/licenses/MIT
19
 * @version   1.0  $Format:%H$
20
 * @link      http://
21
 * @since     File available since Release 1.0.0
22
 * PHP Version 5
23
 */
24
namespace Hospitalplugin\Entities;
25
26
/**
27
 * PatientZZ
28
 *
29
 * @category  Wp
30
 * @package   Punction
31
 * @author    Andrzej Marcinkowski <[email protected]>
32
 * @copyright 2014 Wojewódzki Szpital Zespolony, Kalisz
33
 * @license   MIT http://opensource.org/licenses/MIT
34
 * @version   1.0  $Format:%H$
35
 * @link      http://
36
 * @since     File available since Release 1.0.0
37
 *      
38
 * @Entity
39
 */
40 View Code Duplication
class PatientDIA extends Patient
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...
41
{
42
43
    /**
44
     * @var string $typ typ pacjenta
45
     */
46
    protected $typ = "DIA";
47
48
    /**
49
     * @Column(columnDefinition="TINYINT(4) DEFAULT 0") *
50
     */
51
    public $aktywnoscFizyczna;
52
53
    /**
54
     * @Column(columnDefinition="TINYINT(4) DEFAULT 0") *
55
     */
56
    public $higiena;
57
58
    /**
59
     * @Column(columnDefinition="TINYINT(4) DEFAULT 0") *
60
     */
61
    public $odzywianie;
62
63
    /**
64
     * @Column(columnDefinition="TINYINT(4) DEFAULT 0") *
65
     */
66
    public $wydalanie;
67
68
    /**
69
     * @Column(columnDefinition="TINYINT(4) DEFAULT 0") *
70
     */
71
    public $pomiarParametrowZyciowych;
72
73
    /**
74
     * @Column(columnDefinition="TINYINT(4) DEFAULT 0") *
75
     */
76
    public $leczenie;
77
78
    /**
79
     * @Column(columnDefinition="TINYINT(4) DEFAULT 0") *
80
     */
81
    public $edukacjaZdrowotnaIOpiekaPsychospoleczna;
82
    //
83
    /**
84
     * @return aktywnoscFizyczna
85
     */
86
    public function getAktywnoscFizyczna()
87
    {
88
        return $this->aktywnoscFizyczna;
89
    }
90
91
    /**
92
     * @param int $aktywnoscFizyczna int aktywnoscFizyczna
93
     * @return PatientZZ
94
     */
95
    public function setAktywnoscFizyczna($aktywnoscFizyczna)
96
    {
97
        $this->aktywnoscFizyczna = $aktywnoscFizyczna;
98
        return $this;
99
    }
100
101
    /**
102
     * @return higiena
103
     */
104
    public function getHigiena()
105
    {
106
        return $this->higiena;
107
    }
108
109
    /**
110
     * @param int $higiena int higiena
111
     * @return PatientZZ
112
     */
113
    public function setHigiena($higiena)
114
    {
115
        $this->higiena = $higiena;
116
        return $this;
117
    }
118
119
    /**
120
     * @return odzywianie
121
     */
122
    public function getOdzywianie()
123
    {
124
        return $this->odzywianie;
125
    }
126
127
    /**
128
     * @param  int $odzywianie int odzywianie
129
     * @return PatientZZ
130
     */
131
    public function setOdzywianie($odzywianie)
132
    {
133
        $this->odzywianie = $odzywianie;
134
        return $this;
135
    }
136
137
    /**
138
     * @return wydalanie
139
     */
140
    public function getWydalanie()
141
    {
142
        return $this->wydalanie;
143
    }
144
145
    /**
146
     * @param  int $wydalanie int wydalanie
147
     * @return PatientZZ
148
     */
149
    public function setWydalanie($wydalanie)
150
    {
151
        $this->wydalanie = $wydalanie;
152
        return $this;
153
    }
154
155
    /**
156
     * @return pomiarParametrowZyciowych
157
     */
158
    public function getPomiarParametrowZyciowych()
159
    {
160
        return $this->pomiarParametrowZyciowych;
161
    }
162
163
    /**
164
     * @param  int $pomiarParametrowZyciowych int pomiarParametrowZyciowych
165
     * @return PatientZZ
166
     */
167
    public function setPomiarParametrowZyciowych($pomiarParametrowZyciowych)
168
    {
169
        $this->pomiarParametrowZyciowych = $pomiarParametrowZyciowych;
170
        return $this;
171
    }
172
173
    /**
174
     * @return leczenie
175
     */
176
    public function getLeczenie()
177
    {
178
        return $this->leczenie;
179
    }
180
181
    /**
182
     * @param  int $leczenie int leczenie
183
     * @return PatientZZ
184
     */
185
    public function setLeczenie($leczenie)
186
    {
187
        $this->leczenie = $leczenie;
188
        return $this;
189
    }
190
191
    /**
192
     * @return $edukacjaZdrowotnaIOpiekaPsychospoleczna
0 ignored issues
show
Documentation introduced by
The doc-type $edukacjaZdrowotnaIOpiekaPsychospoleczna could not be parsed: Unknown type name "$edukacjaZdrowotnaIOpiekaPsychospoleczna" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
193
     */
194
    public function getEdukacjaZdrowotnaIOpiekaPsychospoleczna()
195
    {
196
        return $this->edukacjaZdrowotnaIOpiekaPsychospoleczna;
197
    }
198
199
    /**
200
     * @param  int $edukacjaZdrowotnaIOpiekaPsychospoleczna int edukacjaZdrowotnaIOpiekaPsychospoleczna
201
     * @return PatientZZ
202
     */
203
    public function setEdukacjaZdrowotnaIOpiekaPsychospoleczna($edukacjaZdrowotnaIOpiekaPsychospoleczna)
204
    {
205
        $this->edukacjaZdrowotnaIOpiekaPsychospoleczna = $edukacjaZdrowotnaIOpiekaPsychospoleczna;
206
        return $this;
207
    }
208
209
    /**
210
     * 
211
     * @return multitype:string
0 ignored issues
show
Documentation introduced by
The doc-type multitype:string could not be parsed: Unknown type name "multitype:string" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
212
     */
213
    public static function getFields()
214
    {
215
        $superFields = parent::getFields();
216
        $fields = array_merge($superFields, array(
217
            "aktywnoscFizyczna",
218
            "higiena",
219
            "odzywianie",
220
            "wydalanie",
221
            "pomiarParametrowZyciowych",
222
            "leczenie",
223
            "edukacjaZdrowotnaIOpiekaPsychospoleczna"
224
        ));
225
        return $fields;
226
    }
227
228
}
229