original_string: protected function iterate(IterableResult $iterator, callable $callback = null)
      {
          $iteration = 0;
          foreach ($iterator as $object) {
              /** @var Redirect $object */
              $object = current($object);
              yield $object;
              if ($callback !== null) {
                  call_user_func($callback, $iteration, $object);
              }
              $iteration++;
          }
      }
code: protected function iterate(IterableResult $iterator, callable $callback = null)
      {
          $iteration = 0;
          foreach ($iterator as $object) {
              /** @var Redirect $object */
              $object = current($object);
              yield $object;
              if ($callback !== null) {
                  call_user_func($callback, $iteration, $object);
              }
              $iteration++;
          }
      }
code_tokens: protected function iterate ( IterableResult $ iterator , callable $ callback = null ) { $ iteration = 0 ; foreach ( $ iterator as $ object ) { /** @var Redirect $object */ $ object = current ( $ object ) ; yield $ object ; if ( $ callback !== null ) { call_user_func ( $ callback , $ iteration , $ object ) ; } $ iteration ++ ; } }
docstring: Iterator over an IterableResult and return a Generator
  
  @param IterableResult $iterator
  @param callable $callback
  @return \Generator<RedirectDto>
docstring_tokens: Iterator over an IterableResult and return a Generator