@@ -123,42 +123,60 @@ public function getParent()
123
123
/**
124
124
* Returns the percentage of classes that has been tested.
125
125
*
126
+ * @param boolean $asString
126
127
* @return integer
127
128
*/
128
- public function getTestedClassesPercent ()
129
+ public function getTestedClassesPercent ($ asString = TRUE )
129
130
{
130
131
return PHP_CodeCoverage_Util::percent (
131
132
$ this ->getNumTestedClasses (),
132
133
$ this ->getNumClasses (),
133
- TRUE
134
+ $ asString
135
+ );
136
+ }
137
+
138
+ /**
139
+ * Returns the percentage of traits that has been tested.
140
+ *
141
+ * @param boolean $asString
142
+ * @return integer
143
+ */
144
+ public function getTestedTraitsPercent ($ asString = TRUE )
145
+ {
146
+ return PHP_CodeCoverage_Util::percent (
147
+ $ this ->getNumTestedTraits (),
148
+ $ this ->getNumTraits (),
149
+ $ asString
134
150
);
135
151
}
136
152
137
153
/**
138
154
* Returns the percentage of methods that has been tested.
139
155
*
156
+ * @param boolean $asString
140
157
* @return integer
141
158
*/
142
- public function getTestedMethodsPercent ()
159
+ public function getTestedMethodsPercent ($ asString = TRUE )
143
160
{
144
161
return PHP_CodeCoverage_Util::percent (
145
162
$ this ->getNumTestedMethods (),
146
163
$ this ->getNumMethods (),
147
- TRUE
164
+ $ asString
148
165
);
149
166
}
150
167
151
168
/**
152
169
* Returns the percentage of executed lines.
153
170
*
171
+ * @param boolean $asString
154
172
* @return integer
155
173
*/
156
- public function getLineExecutedPercent ()
174
+ public function getLineExecutedPercent ($ asString = TRUE )
157
175
{
158
176
return PHP_CodeCoverage_Util::percent (
159
177
$ this ->getNumExecutedLines (),
160
178
$ this ->getNumExecutableLines (),
161
- TRUE
179
+ $ asString
162
180
);
163
181
}
164
182
0 commit comments