src/mako/cli/output/helpers/ProgressBar.php
public function draw(): void
	{
		// Don't draw progess bar if there are 0 items

		if($this->items === 0)
		{
			return;
		}

		// Calculate percent

		$percent = (float) min(($this->progress / $this->items), 1);

		// Build progress bar

		$progressBar = $this->buildProgressBar($percent);

		// Draw progressbar

		$this->output->write("\r" . $this->prefix . $progressBar);

		// If we're done then we'll add a newline to the output

		if($this->progress === $this->items)
		{
			$this->output->write(PHP_EOL);
		}
	}
public function draw(): void
	{
		// Don't draw progess bar if there are 0 items

		if($this->items === 0)
		{
			return;
		}

		// Calculate percent

		$percent = (float) min(($this->progress / $this->items), 1);

		// Build progress bar

		$progressBar = $this->buildProgressBar($percent);

		// Draw progressbar

		$this->output->write("\r" . $this->prefix . $progressBar);

		// If we're done then we'll add a newline to the output

		if($this->progress === $this->items)
		{
			$this->output->write(PHP_EOL);
		}
	}
public function draw ( ) : void { // Don't draw progess bar if there are 0 items if ( $ this -> items === 0 ) { return ; } // Calculate percent $ percent = ( float ) min ( ( $ this -> progress / $ this -> items ) , 1 ) ; // Build progress bar $ progressBar = $ this -> buildProgressBar ( $ percent ) ; // Draw progressbar $ this -> output -> write ( "\r" . $ this -> prefix . $ progressBar ) ; // If we're done then we'll add a newline to the output if ( $ this -> progress === $ this -> items ) { $ this -> output -> write ( PHP_EOL ) ; } }
Draws the progressbar.
Draws the progressbar .