original_string: public function pop(int $num) : Collection
      {
          $ret = new Collection();
          foreach ($this -> iterator as $item) {
              if (!$num--)
                  return $ret;
              $ret[] = unserialize(file_get_contents($item));
              unlink($item);
          }
          $this -> updateIterator();
          return $ret;
      }
code: public function pop(int $num) : Collection
      {
          $ret = new Collection();
          foreach ($this -> iterator as $item) {
              if (!$num--)
                  return $ret;
              $ret[] = unserialize(file_get_contents($item));
              unlink($item);
          }
          $this -> updateIterator();
          return $ret;
      }
code_tokens: public function pop ( int $ num ) : Collection { $ ret = new Collection ( ) ; foreach ( $ this -> iterator as $ item ) { if ( ! $ num -- ) return $ ret ; $ ret [ ] = unserialize ( file_get_contents ( $ item ) ) ; unlink ( $ item ) ; } $ this -> updateIterator ( ) ; return $ ret ; }
docstring: Get the oldest items from the queue
  @param int $num the number of items to pop
  @return Collection
  TODO fix situation when crash is immediately after pop;
docstring_tokens: Get the oldest items from the queue