* @param bool $round Whether or not to round the value, default true
* @return float
*/
-function percent( $nr, $acc = 2, $round = true ) {
+function wfPercent( $nr, $acc = 2, $round = true ) {
$ret = sprintf( "%.${acc}f", $nr );
return $round ? round( $ret, $acc ) . '%' : "$ret%";
}
}
}
if( $total > 0 ) {
- $ratio = percent( 100 * $success / $total );
+ $ratio = wfPercent( 100 * $success / $total );
print $this->termColor( 1 ) . "\nPassed $success of $total tests ($ratio) ";
if( $success == $total ) {
print $this->termColor( 32 ) . "PASSED!";