original_string: public function draw()
      {
          $numberLen = strlen(' 100%');
          $complete = round($this->_progress / $this->_total, 2);
          $barLen = ($this->_width - $numberLen) * ($this->_progress / $this->_total);
          $bar = '';
          if ($barLen > 1) {
              $bar = str_repeat('=', $barLen - 1) . '>';
          }
  
          $pad = ceil($this->_width - $numberLen - $barLen);
          if ($pad > 0) {
              $bar .= str_repeat(' ', $pad);
          }
          $percent = ($complete * 100) . '%';
          $bar .= str_pad($percent, $numberLen, ' ', STR_PAD_LEFT);
  
          $this->_io->overwrite($bar, 0);
  
          return $this;
      }
code: public function draw()
      {
          $numberLen = strlen(' 100%');
          $complete = round($this->_progress / $this->_total, 2);
          $barLen = ($this->_width - $numberLen) * ($this->_progress / $this->_total);
          $bar = '';
          if ($barLen > 1) {
              $bar = str_repeat('=', $barLen - 1) . '>';
          }
  
          $pad = ceil($this->_width - $numberLen - $barLen);
          if ($pad > 0) {
              $bar .= str_repeat(' ', $pad);
          }
          $percent = ($complete * 100) . '%';
          $bar .= str_pad($percent, $numberLen, ' ', STR_PAD_LEFT);
  
          $this->_io->overwrite($bar, 0);
  
          return $this;
      }
code_tokens: public function draw ( ) { $ numberLen = strlen ( ' 100%' ) ; $ complete = round ( $ this -> _progress / $ this -> _total , 2 ) ; $ barLen = ( $ this -> _width - $ numberLen ) * ( $ this -> _progress / $ this -> _total ) ; $ bar = '' ; if ( $ barLen > 1 ) { $ bar = str_repeat ( '=' , $ barLen - 1 ) . '>' ; } $ pad = ceil ( $ this -> _width - $ numberLen - $ barLen ) ; if ( $ pad > 0 ) { $ bar .= str_repeat ( ' ' , $ pad ) ; } $ percent = ( $ complete * 100 ) . '%' ; $ bar .= str_pad ( $ percent , $ numberLen , ' ' , STR_PAD_LEFT ) ; $ this -> _io -> overwrite ( $ bar , 0 ) ; return $ this ; }
docstring: Render the progress bar based on the current state.
  
  @return $this
docstring_tokens: Render the progress bar based on the current state .