Skip to content

Commit ef4ca73

Browse files
snoobwebmozart
authored andcommitted
[Validator][Console][HttpFoundation] Use "KiB" everywhere (instead of "kB")
1 parent 50be4f3 commit ef4ca73

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Helper/Helper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ public static function formatTime($secs)
9292
public static function formatMemory($memory)
9393
{
9494
if ($memory >= 1024 * 1024 * 1024) {
95-
return sprintf('%.1f GB', $memory / 1024 / 1024 / 1024);
95+
return sprintf('%.1f GiB', $memory / 1024 / 1024 / 1024);
9696
}
9797

9898
if ($memory >= 1024 * 1024) {
99-
return sprintf('%.1f MB', $memory / 1024 / 1024);
99+
return sprintf('%.1f MiB', $memory / 1024 / 1024);
100100
}
101101

102102
if ($memory >= 1024) {
103-
return sprintf('%d kB', $memory / 1024);
103+
return sprintf('%d KiB', $memory / 1024);
104104
}
105105

106106
return sprintf('%d B', $memory);

Tests/Helper/ProgressBarTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,17 +367,17 @@ public function testAnsiColorsAndEmojis()
367367
$this->generateOutput(
368368
" \033[44;37m Starting the demo... fingers crossed \033[0m\n".
369369
" 0/15 ".$progress.str_repeat($empty, 26)." 0%\n".
370-
" 🏁 1 sec \033[44;37m 0 B \033[0m"
370+
" \xf0\x9f\x8f\x81 1 sec \033[44;37m 0 B \033[0m"
371371
).
372372
$this->generateOutput(
373373
" \033[44;37m Looks good to me... \033[0m\n".
374374
" 4/15 ".str_repeat($done, 7).$progress.str_repeat($empty, 19)." 26%\n".
375-
" 🏁 1 sec \033[41;37m 97 kB \033[0m"
375+
" \xf0\x9f\x8f\x81 1 sec \033[41;37m 97 KiB \033[0m"
376376
).
377377
$this->generateOutput(
378378
" \033[44;37m Thanks, bye \033[0m\n".
379379
" 15/15 ".str_repeat($done, 28)." 100%\n".
380-
" 🏁 1 sec \033[41;37m 195 kB \033[0m"
380+
" \xf0\x9f\x8f\x81 1 sec \033[41;37m 195 KiB \033[0m"
381381
),
382382
stream_get_contents($output->getStream())
383383
);

0 commit comments

Comments
 (0)