src/Collection/ArrayCollection.php
public function union($items): ArrayCollection
    {
        return new static(array_unique(array_merge($this->items, $this->itemsArray($items))));
    }
public function union($items): ArrayCollection
    {
        return new static(array_unique(array_merge($this->items, $this->itemsArray($items))));
    }
public function union ( $ items ) : ArrayCollection { return new static ( array_unique ( array_merge ( $ this -> items , $ this -> itemsArray ( $ items ) ) ) ) ; }
Creates a collection with the union of current and given items

@param mixed $items The items

@return ArrayCollection
Creates a collection with the union of current and given items