src/mako/cli/output/helpers/ProgressBar.php
protected function buildProgressBar(float $percent): string
	{
		$fill = (int) floor($percent * $this->width);

		$progressBar  = str_pad($this->progress, strlen($this->items), '0', STR_PAD_LEFT) . '/' . $this->items . ' ';

		$progressBar .= str_repeat($this->filledTemplate, $fill);

		$progressBar .= str_repeat($this->emptyTemplate, ($this->width - $fill));

		$progressBar .= str_pad(' ' . ((int) ($percent * 100)) . '% ', 6, ' ', STR_PAD_LEFT);

		return $progressBar;
	}
protected function buildProgressBar(float $percent): string
	{
		$fill = (int) floor($percent * $this->width);

		$progressBar  = str_pad($this->progress, strlen($this->items), '0', STR_PAD_LEFT) . '/' . $this->items . ' ';

		$progressBar .= str_repeat($this->filledTemplate, $fill);

		$progressBar .= str_repeat($this->emptyTemplate, ($this->width - $fill));

		$progressBar .= str_pad(' ' . ((int) ($percent * 100)) . '% ', 6, ' ', STR_PAD_LEFT);

		return $progressBar;
	}
protected function buildProgressBar ( float $ percent ) : string { $ fill = ( int ) floor ( $ percent * $ this -> width ) ; $ progressBar = str_pad ( $ this -> progress , strlen ( $ this -> items ) , '0' , STR_PAD_LEFT ) . '/' . $ this -> items . ' ' ; $ progressBar .= str_repeat ( $ this -> filledTemplate , $ fill ) ; $ progressBar .= str_repeat ( $ this -> emptyTemplate , ( $ this -> width - $ fill ) ) ; $ progressBar .= str_pad ( ' ' . ( ( int ) ( $ percent * 100 ) ) . '% ' , 6 , ' ' , STR_PAD_LEFT ) ; return $ progressBar ; }
Builds the progressbar.

@param  float  $percent Percent to fill
@return string
Builds the progressbar .