src/TerminalObject/Dynamic/Progress.php
public function current($current, $label = null)
    {
        if ($this->total == 0) {
            // Avoid dividing by 0
            throw new UnexpectedValueException('The progress total must be greater than zero.');
        }

        if ($current > $this->total) {
            throw new UnexpectedValueException('The current is greater than the total.');
        }

        $this->drawProgressBar($current, $label);

        $this->current = $current;
        $this->label   = $label;
    }
public function current($current, $label = null)
    {
        if ($this->total == 0) {
            // Avoid dividing by 0
            throw new UnexpectedValueException('The progress total must be greater than zero.');
        }

        if ($current > $this->total) {
            throw new UnexpectedValueException('The current is greater than the total.');
        }

        $this->drawProgressBar($current, $label);

        $this->current = $current;
        $this->label   = $label;
    }
public function current ( $ current , $ label = null ) { if ( $ this -> total == 0 ) { // Avoid dividing by 0 throw new UnexpectedValueException ( 'The progress total must be greater than zero.' ) ; } if ( $ current > $ this -> total ) { throw new UnexpectedValueException ( 'The current is greater than the total.' ) ; } $ this -> drawProgressBar ( $ current , $ label ) ; $ this -> current = $ current ; $ this -> label = $ label ; }
Determines the current percentage we are at and re-writes the progress bar

@param integer $current
@param mixed   $label

@return void
@throws UnexpectedValueException
Determines the current percentage we are at and re - writes the progress bar