private function mergeMetadata(EntityMetadata &$metadata = null, EntityMetadata $toAdd)
    {
        if (null === $metadata) {
            $metadata = clone $toAdd;
        } else {
            $metadata->merge($toAdd);
        }
    }
private function mergeMetadata(EntityMetadata &$metadata = null, EntityMetadata $toAdd)
    {
        if (null === $metadata) {
            $metadata = clone $toAdd;
        } else {
            $metadata->merge($toAdd);
        }
    }
private function mergeMetadata ( EntityMetadata & $ metadata = null , EntityMetadata $ toAdd ) { if ( null === $ metadata ) { $ metadata = clone $ toAdd ; } else { $ metadata -> merge ( $ toAdd ) ; } }
Merges two sets of EntityMetadata.
Is used for applying inheritance information.

@param   EntityMetadata  &$metadata
@param   EntityMetadata  $toAdd
Merges two sets of EntityMetadata . Is used for applying inheritance information .