Skip to content

Commit a0fc0d2

Browse files
Thomason, JamesThomason, James
authored andcommitted
Reorder method name, add branches support
1 parent 2ec1bdc commit a0fc0d2

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/Node/AbstractNode.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public function getTestedMethodsPercent(bool $asString = true)
185185
*
186186
* @return int|string
187187
*/
188-
public function getPathsTestedPercent(bool $asString = true)
188+
public function getTestedPathsPercent(bool $asString = true)
189189
{
190190
return Util::percent(
191191
$this->getNumTestedPaths(),
@@ -194,6 +194,20 @@ public function getPathsTestedPercent(bool $asString = true)
194194
);
195195
}
196196

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+
197211
/**
198212
* Returns the percentage of functions and methods that has been tested.
199213
*

0 commit comments

Comments
 (0)