File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,16 +77,16 @@ protected function display(): void
7777 protected function buildLine (int $ filled , int $ empty , float $ percent ): string
7878 {
7979 return vsprintf (' %s/%s [%s] %s%% ' , [
80- $ this ->current ,
81- $ this ->total ,
80+ $ this ->numberFormat ( $ this -> current ) ,
81+ $ this ->numberFormat ( $ this -> total ) ,
8282 $ this ->buildBar ($ filled , $ empty ),
8383 $ this ->percentText ($ percent ),
8484 ]);
8585 }
8686
8787 protected function buildBar (int $ filled , int $ empty ): string
8888 {
89- return str_repeat ('█ ' , $ filled ) . str_repeat ('░ ' , $ empty );
89+ return str_repeat ('▓ ' , $ filled ) . str_repeat ('░ ' , $ empty );
9090 }
9191
9292 protected function percent (): float
@@ -108,4 +108,9 @@ protected function percentText(float $percent): int
108108 {
109109 return (int ) floor ($ percent * 100 );
110110 }
111+
112+ protected function numberFormat (int $ number ): string
113+ {
114+ return number_format ($ number , thousands_separator: "' " );
115+ }
111116}
You can’t perform that action at this time.
0 commit comments