Completed
Push — master ( db01b7...1c2473 )
by Tom
01:44
created
src/Formatter/Number.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@
 block discarded – undo
14 14
 
15 15
 	public function decimal($num, $decimals) {
16 16
 		if (!is_numeric($num)) return $num;
17
-		return number_format((float)$num, $decimals, $this->locale['decimal_separator'], $this->locale['thousands_separator']);
17
+		return number_format((float) $num, $decimals, $this->locale['decimal_separator'], $this->locale['thousands_separator']);
18 18
 	}
19 19
 
20 20
 	public function currency($num) {
21 21
 		$num = $this->decimal($num, $this->locale['currency_decimals']);
22
-		if ($this->locale['currency_position'] === 'before') return $this->locale['currency'] . $num;
23
-		else return $num . $this->locale['currency'];
22
+		if ($this->locale['currency_position'] === 'before') return $this->locale['currency'].$num;
23
+		else return $num.$this->locale['currency'];
24 24
 	}
25 25
 }
Please login to merge, or discard this patch.
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,13 +13,18 @@
 block discarded – undo
13 13
 	}
14 14
 
15 15
 	public function decimal($num, $decimals) {
16
-		if (!is_numeric($num)) return $num;
16
+		if (!is_numeric($num)) {
17
+			return $num;
18
+		}
17 19
 		return number_format((float)$num, $decimals, $this->locale['decimal_separator'], $this->locale['thousands_separator']);
18 20
 	}
19 21
 
20 22
 	public function currency($num) {
21 23
 		$num = $this->decimal($num, $this->locale['currency_decimals']);
22
-		if ($this->locale['currency_position'] === 'before') return $this->locale['currency'] . $num;
23
-		else return $num . $this->locale['currency'];
24
+		if ($this->locale['currency_position'] === 'before') {
25
+			return $this->locale['currency'] . $num;
26
+		} else {
27
+			return $num . $this->locale['currency'];
28
+		}
24 29
 	}
25 30
 }
Please login to merge, or discard this patch.