Skip to content

Commit dea56ac

Browse files
committed
[CLEANUP] Avoid Hungarian notation in Size::render()
Part of #756
1 parent a548ded commit dea56ac

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Value/Size.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,11 @@ public function __toString(): string
220220

221221
public function render(OutputFormat $outputFormat): string
222222
{
223-
$l = \localeconv();
224-
$sPoint = \preg_quote($l['decimal_point'], '/');
223+
$locale = \localeconv();
224+
$decimalPoint = \preg_quote($locale['decimal_point'], '/');
225225
$size = \preg_match('/[\\d\\.]+e[+-]?\\d+/i', (string) $this->size)
226-
? \preg_replace("/$sPoint?0+$/", '', \sprintf('%f', $this->size)) : (string) $this->size;
227-
return \preg_replace(["/$sPoint/", '/^(-?)0\\./'], ['.', '$1.'], $size)
228-
. ($this->unit ?? '');
226+
? \preg_replace("/$decimalPoint?0+$/", '', \sprintf('%f', $this->size)) : (string) $this->size;
227+
228+
return \preg_replace(["/$decimalPoint/", '/^(-?)0\\./'], ['.', '$1.'], $size) . ($this->unit ?? '');
229229
}
230230
}

0 commit comments

Comments
 (0)