1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This file is part of the Clover to Html package. |
5
|
|
|
* |
6
|
|
|
* (c) Stéphane Demonchaux <[email protected]> |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
namespace CloverToHtml; |
12
|
|
|
|
13
|
|
|
class ClassDto |
14
|
|
|
{ |
15
|
|
|
/** |
16
|
|
|
* @var string |
17
|
|
|
*/ |
18
|
|
|
private $name; |
19
|
|
|
/** |
20
|
|
|
* @var array |
21
|
|
|
*/ |
22
|
|
|
private $method = array(); |
23
|
|
|
/** |
24
|
|
|
* @var int |
25
|
|
|
*/ |
26
|
|
|
private $crap; |
27
|
|
|
/** |
28
|
|
|
* @var int |
29
|
|
|
*/ |
30
|
|
|
private $lineCount; |
31
|
|
|
/** |
32
|
|
|
* @var int |
33
|
|
|
*/ |
34
|
|
|
private $lineCoveredCount; |
35
|
|
|
/** |
36
|
|
|
* @var int |
37
|
|
|
*/ |
38
|
|
|
private $elementCount; |
39
|
|
|
/** |
40
|
|
|
* @var int |
41
|
|
|
*/ |
42
|
|
|
private $elementCoveredCount; |
43
|
|
|
/** |
44
|
|
|
* @var int |
45
|
|
|
*/ |
46
|
|
|
private $conditionalCount; |
47
|
|
|
/** |
48
|
|
|
* @var int |
49
|
|
|
*/ |
50
|
|
|
private $conditionalCoveredCount; |
51
|
|
|
/** |
52
|
|
|
* @var int |
53
|
|
|
*/ |
54
|
|
|
private $methodCount; |
55
|
|
|
/** |
56
|
|
|
* @var int |
57
|
|
|
*/ |
58
|
|
|
private $methodCoveredCount; |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @param string $value |
62
|
|
|
*/ |
63
|
|
|
public function setName($value): void |
64
|
|
|
{ |
65
|
|
|
$this->name = $value; |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @param integer $value |
70
|
|
|
*/ |
71
|
|
|
public function setMethodCount($value): void |
72
|
|
|
{ |
73
|
|
|
$this->methodCount = $value; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @param string $name |
78
|
|
|
* @param int $crap |
79
|
|
|
* @param int $lineCount |
80
|
|
|
* @param int $lineCoveredCount |
81
|
|
|
* @param int $lineNumber |
82
|
|
|
*/ |
83
|
|
|
public function addMethod($name, $crap, $lineCount, $lineCoveredCount, $lineNumber): void |
84
|
|
|
{ |
85
|
|
|
$this->method[] = array( |
86
|
|
|
'name' => $name, |
87
|
|
|
'crap' => $crap, |
88
|
|
|
'lineCount' => $lineCount, |
89
|
|
|
'lineCoveredCount' => $lineCoveredCount, |
90
|
|
|
'lineNumber' => $lineNumber |
91
|
|
|
); |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @param int $crap |
96
|
|
|
*/ |
97
|
|
|
public function setCrap($crap): void |
98
|
|
|
{ |
99
|
|
|
$this->crap = $crap; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @param int $lineCount |
104
|
|
|
*/ |
105
|
|
|
public function setLineCount($lineCount): void |
106
|
|
|
{ |
107
|
|
|
$this->lineCount = $lineCount; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @param int $lineCoveredCount |
112
|
|
|
*/ |
113
|
|
|
public function setLineCoveredCount($lineCoveredCount): void |
114
|
|
|
{ |
115
|
|
|
$this->lineCoveredCount = $lineCoveredCount; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @param int $elementCount |
120
|
|
|
*/ |
121
|
|
|
public function setElementCount($elementCount): void |
122
|
|
|
{ |
123
|
|
|
$this->elementCount = $elementCount; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @param int $elementCoveredCount |
128
|
|
|
*/ |
129
|
|
|
public function setElementCoveredCount($elementCoveredCount): void |
130
|
|
|
{ |
131
|
|
|
$this->elementCoveredCount = $elementCoveredCount; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @param int $conditionalCount |
136
|
|
|
*/ |
137
|
|
|
public function setConditionalCount($conditionalCount): void |
138
|
|
|
{ |
139
|
|
|
$this->conditionalCount = $conditionalCount; |
140
|
|
|
} |
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* @param int $conditionalCoveredCount |
144
|
|
|
*/ |
145
|
|
|
public function setConditionalCoveredCount($conditionalCoveredCount): void |
146
|
|
|
{ |
147
|
|
|
$this->conditionalCoveredCount = $conditionalCoveredCount; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* @param int $value |
152
|
|
|
*/ |
153
|
|
|
public function setMethodCoveredCount($value): void |
154
|
|
|
{ |
155
|
|
|
$this->methodCoveredCount = $value; |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* @return array |
160
|
|
|
*/ |
161
|
|
|
public function getMethodCollection(): array |
162
|
|
|
{ |
163
|
|
|
return $this->method; |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* @return number |
168
|
|
|
*/ |
169
|
|
|
public function getCrap() |
170
|
|
|
{ |
171
|
|
|
return $this->crap; |
172
|
|
|
} |
173
|
|
|
|
174
|
|
|
/** |
175
|
|
|
* @return string |
176
|
|
|
*/ |
177
|
|
|
public function getName(): string |
178
|
|
|
{ |
179
|
|
|
return $this->name; |
180
|
|
|
} |
181
|
|
|
|
182
|
|
|
/** |
183
|
|
|
* @return number |
184
|
|
|
*/ |
185
|
|
|
public function getMethodCount() |
186
|
|
|
{ |
187
|
|
|
return $this->methodCount; |
188
|
|
|
} |
189
|
|
|
|
190
|
|
|
/** |
191
|
|
|
* @return number |
192
|
|
|
*/ |
193
|
|
|
public function getLineCount() |
194
|
|
|
{ |
195
|
|
|
return $this->lineCount; |
196
|
|
|
} |
197
|
|
|
|
198
|
|
|
/** |
199
|
|
|
* @return number |
200
|
|
|
*/ |
201
|
|
|
public function getLineCoveredCount() |
202
|
|
|
{ |
203
|
|
|
return $this->lineCoveredCount; |
204
|
|
|
} |
205
|
|
|
|
206
|
|
|
/** |
207
|
|
|
* @return number |
208
|
|
|
*/ |
209
|
|
|
public function getMethodCoveredCount() |
210
|
|
|
{ |
211
|
|
|
return $this->methodCoveredCount; |
212
|
|
|
} |
213
|
|
|
} |
214
|
|
|
|