Conditions | 5 |
Paths | 5 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | public static function strval($value): string { |
||
9 | if (is_double($value)) { |
||
10 | $str = \strval($value); |
||
11 | if (strlen($str) == 1) { |
||
12 | return sprintf("%1\$.1f",$value); |
||
13 | } |
||
14 | return \strval($value); |
||
15 | } |
||
16 | if (is_bool($value)) { |
||
17 | return $value ? "true" : "false"; |
||
18 | } |
||
19 | return "$value"; |
||
20 | } |
||
26 |