src/Scenario/ConsoleProgressBarTrait.php
public function postSearch(): void {
    if ($this->progress) {
      $iterator = $this->getIterator();

      if ($iterator instanceof \SplFileObject) {
        // Get current byte offset, after the line was read.
        $this->progress->setProgress($iterator->ftell());
      }
      elseif (is_int($key = $iterator->key())) {
        // Add one to the current index, because we're in the post-search phase.
        $this->progress->setProgress($key + 1);
      }
      else {
        // If iterator's key is not integer, just advance the progress with 1.
        $this->progress->advance();
      }
    }
  }
public function postSearch(): void {
    if ($this->progress) {
      $iterator = $this->getIterator();

      if ($iterator instanceof \SplFileObject) {
        // Get current byte offset, after the line was read.
        $this->progress->setProgress($iterator->ftell());
      }
      elseif (is_int($key = $iterator->key())) {
        // Add one to the current index, because we're in the post-search phase.
        $this->progress->setProgress($key + 1);
      }
      else {
        // If iterator's key is not integer, just advance the progress with 1.
        $this->progress->advance();
      }
    }
  }
public function postSearch ( ) : void { if ( $ this -> progress ) { $ iterator = $ this -> getIterator ( ) ; if ( $ iterator instanceof \ SplFileObject ) { // Get current byte offset, after the line was read. $ this -> progress -> setProgress ( $ iterator -> ftell ( ) ) ; } elseif ( is_int ( $ key = $ iterator -> key ( ) ) ) { // Add one to the current index, because we're in the post-search phase. $ this -> progress -> setProgress ( $ key + 1 ) ; } else { // If iterator's key is not integer, just advance the progress with 1. $ this -> progress -> advance ( ) ; } } }
Updates the current progress in the post-search phase.

@see \Shiyan\Iterate\Scenario\ScenarioInterface::postSearch()
Updates the current progress in the post - search phase .