From dea56acf2bb08f56a5d11814327b7a0988a22598 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 6 Mar 2025 09:53:44 +0100 Subject: [PATCH] [CLEANUP] Avoid Hungarian notation in `Size::render()` Part of #756 --- src/Value/Size.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Value/Size.php b/src/Value/Size.php index 887ad795..b3b8bec7 100644 --- a/src/Value/Size.php +++ b/src/Value/Size.php @@ -220,11 +220,11 @@ public function __toString(): string public function render(OutputFormat $outputFormat): string { - $l = \localeconv(); - $sPoint = \preg_quote($l['decimal_point'], '/'); + $locale = \localeconv(); + $decimalPoint = \preg_quote($locale['decimal_point'], '/'); $size = \preg_match('/[\\d\\.]+e[+-]?\\d+/i', (string) $this->size) - ? \preg_replace("/$sPoint?0+$/", '', \sprintf('%f', $this->size)) : (string) $this->size; - return \preg_replace(["/$sPoint/", '/^(-?)0\\./'], ['.', '$1.'], $size) - . ($this->unit ?? ''); + ? \preg_replace("/$decimalPoint?0+$/", '', \sprintf('%f', $this->size)) : (string) $this->size; + + return \preg_replace(["/$decimalPoint/", '/^(-?)0\\./'], ['.', '$1.'], $size) . ($this->unit ?? ''); } }