public function apply(
        ComparableCollectionInterface $sourceCollection,
        bool $keepOriginalOrder = false
    ): ComparableCollectionInterface {
        $collectionClass = get_class($sourceCollection);
        $source = $sourceCollection->toArray();
        $array = [];

        foreach ($this->changes as $key => [$action, $item]) {
            if (self::SOURCE === $action) {
                if ($item !== $key) {
                    $array[$key] = $sourceCollection[$item];
                }
            } elseif (self::ADDED === $action) {
                $array[$key] = $item;
            } elseif (self::REMOVED === $action) {
                unset($array[$key]);
            } else {
                $array[$key] = $item;
            }
        }

        if ($keepOriginalOrder) {
            $array = array_merge($this->changes, $source);
        }

        return new $collectionClass($array);
    }