public function merge($collection2) { $collection = clone $this; $collection->data = a::merge($collection->data, $collection2->data); return $collection; }
public static function newMerged(array $decks) { $merged = new Collection(); foreach ($decks as $deck) { $merged->merge($deck); } return new static($merged); }