@@ -180,6 +180,34 @@ public function getTestedMethodsPercent(bool $asString = true)
180
180
);
181
181
}
182
182
183
+ /**
184
+ * Returns the percentage of paths that have been tested.
185
+ *
186
+ * @return int|string
187
+ */
188
+ public function getTestedPathsPercent (bool $ asString = true )
189
+ {
190
+ return Util::percent (
191
+ $ this ->getNumTestedPaths (),
192
+ $ this ->getNumPaths (),
193
+ $ asString
194
+ );
195
+ }
196
+
197
+ /**
198
+ * Returns the percentage of branches that have been tested.
199
+ *
200
+ * @return int|string
201
+ */
202
+ public function getTestedBranchesPercent (bool $ asString = true )
203
+ {
204
+ return Util::percent (
205
+ $ this ->getNumTestedBranches (),
206
+ $ this ->getNumBranches (),
207
+ $ asString
208
+ );
209
+ }
210
+
183
211
/**
184
212
* Returns the percentage of functions and methods that has been tested.
185
213
*
@@ -276,6 +304,16 @@ abstract public function getFunctions(): array;
276
304
*/
277
305
abstract public function getLinesOfCode (): array ;
278
306
307
+ /**
308
+ * Returns the paths of this node.
309
+ */
310
+ abstract public function getPaths (): array ;
311
+
312
+ /**
313
+ * Returns the branches of this node.
314
+ */
315
+ abstract public function getBranches (): array ;
316
+
279
317
/**
280
318
* Returns the number of executable lines.
281
319
*/
@@ -325,4 +363,24 @@ abstract public function getNumFunctions(): int;
325
363
* Returns the number of tested functions.
326
364
*/
327
365
abstract public function getNumTestedFunctions (): int ;
366
+
367
+ /**
368
+ * Returns the number of paths.
369
+ */
370
+ abstract public function getNumPaths (): int ;
371
+
372
+ /**
373
+ * Returns the number of tested paths.
374
+ */
375
+ abstract public function getNumTestedPaths (): int ;
376
+
377
+ /**
378
+ * Returns the number of branches.
379
+ */
380
+ abstract public function getNumBranches (): int ;
381
+
382
+ /**
383
+ * Returns the number of tested branches.
384
+ */
385
+ abstract public function getNumTestedBranches (): int ;
328
386
}
0 commit comments