protected function rebuildItemList(?Item $currentItem = null): void
    {
        if (count($this->items) === 0) {
            $this->items = $this->skippedItems;
            $this->skippedItems = new ItemList();
        }

        if ($currentItem instanceof Item) {
            $this->items->insert($currentItem);
        }
    }
protected function rebuildItemList(?Item $currentItem = null): void
    {
        if (count($this->items) === 0) {
            $this->items = $this->skippedItems;
            $this->skippedItems = new ItemList();
        }

        if ($currentItem instanceof Item) {
            $this->items->insert($currentItem);
        }
    }
protected function rebuildItemList ( ? Item $ currentItem = null ) : void { if ( count ( $ this -> items ) === 0 ) { $ this -> items = $ this -> skippedItems ; $ this -> skippedItems = new ItemList ( ) ; } if ( $ currentItem instanceof Item ) { $ this -> items -> insert ( $ currentItem ) ; } }
Reintegrate skipped items into main list.

@param Item|null $currentItem item from current iteration
Reintegrate skipped items into main list .