protected function createLink(LinkDefinition $definition, LinkData $data): LinkObject
    {
        $reference = $data->getReference();

        $metadata = array_replace(
            $data->getMetadata(),
            $definition->getMetadata()
        );

        return new LinkObject($reference, $metadata);
    }
protected function createLink(LinkDefinition $definition, LinkData $data): LinkObject
    {
        $reference = $data->getReference();

        $metadata = array_replace(
            $data->getMetadata(),
            $definition->getMetadata()
        );

        return new LinkObject($reference, $metadata);
    }
protected function createLink ( LinkDefinition $ definition , LinkData $ data ) : LinkObject { $ reference = $ data -> getReference ( ) ; $ metadata = array_replace ( $ data -> getMetadata ( ) , $ definition -> getMetadata ( ) ) ; return new LinkObject ( $ reference , $ metadata ) ; }
Create link-object

@param  LinkDefinition $definition
@param  LinkData       $data
@return LinkObject
Create link - object