public function merge(ActivityFeed $newerFeed): ActivityFeed
    {
        if (count($this->getItems()) > 0) {
            $prepend = $newerFeed->getItemsAfter($this->getItems()[0]);
        } else {
            $prepend = $newerFeed->getItems();
        }

        return new ActivityFeed(array_merge($prepend, $this->getItems()));
    }
public function merge(ActivityFeed $newerFeed): ActivityFeed
    {
        if (count($this->getItems()) > 0) {
            $prepend = $newerFeed->getItemsAfter($this->getItems()[0]);
        } else {
            $prepend = $newerFeed->getItems();
        }

        return new ActivityFeed(array_merge($prepend, $this->getItems()));
    }
public function merge ( ActivityFeed $ newerFeed ) : ActivityFeed { if ( count ( $ this -> getItems ( ) ) > 0 ) { $ prepend = $ newerFeed -> getItemsAfter ( $ this -> getItems ( ) [ 0 ] ) ; } else { $ prepend = $ newerFeed -> getItems ( ) ; } return new ActivityFeed ( array_merge ( $ prepend , $ this -> getItems ( ) ) ) ; }
Merges this ActivityFeed with a newer feed.
Returns a new feed with all new items from the newerFeed prepended to it.

@param ActivityFeed $newerFeed
@return ActivityFeed
Merges this ActivityFeed with a newer feed . Returns a new feed with all new items from the newerFeed prepended to it .