public function mergedWith(Metadata $additionalMetadata): self
    {
        $values = array_merge($this->values, $additionalMetadata->values);

        if ($values === $this->values) {
            return $this;
        }

        return new static($values);
    }
public function mergedWith(Metadata $additionalMetadata): self
    {
        $values = array_merge($this->values, $additionalMetadata->values);

        if ($values === $this->values) {
            return $this;
        }

        return new static($values);
    }
public function mergedWith ( Metadata $ additionalMetadata ) : self { $ values = array_merge ( $ this -> values , $ additionalMetadata -> values ) ; if ( $ values === $ this -> values ) { return $ this ; } return new static ( $ values ) ; }
Returns a Metadata instance containing values of this, combined with the given additionalMetadata.
If any entries have identical keys, the values from the additionalMetadata will take precedence.

@param Metadata $additionalMetadata
@return self
Returns a Metadata instance containing values of this combined with the given additionalMetadata . If any entries have identical keys the values from the additionalMetadata will take precedence .