Merge a attribute into this one

@param self $attribute
345041
public function merge(self $attribute)
    {
        if ($this->propertyName === null && $attribute->hasPropertyName()) {
            $this->propertyName = $attribute->getPropertyName();
        }

        if ($this->type === null && $attribute->hasType()) {
            $this->type = $attribute->getType();
        }

        if ($this->many === null && $attribute->hasManyDefined()) {
            $this->many = $attribute->isMany();
        }

        if (empty($this->typeParameters)) {
            $this->typeParameters = $attribute->getTypeParameters();
        }

        if ($this->processNull === null && $attribute->hasProcessNull()) {
            $this->processNull = $attribute->getProcessNull();
        }
    }
1086098
public function merge( array $attributes ) {
		foreach ( $attributes as $name => $value ) {
			$this->set_attribute( $name, $value );
		}

		return $this;
	}
225603
protected function takeAttributeFromDOM($attribute)
    {
        switch ($attribute->localName) {
        case 'state':
            $this->_state = $attribute->nodeValue;
            break;
        default:
            parent::takeAttributeFromDOM($attribute);
        }
    }
1088997
public function addAttributes($attributes)
    {
        foreach ($attributes as $name => $value) {
            if (!is_array($value)) {
                $value = [$value];
            }
            parent::attr($name, ...$value);
        }

        return $this;
    }
851286
public function registerCustomAttributes($attributes) 
    {
        if( is_string($attributes) ) {
            $attributes = explode(' ',$attributes);
        }
        $this->customAttributes = array_merge( $this->customAttributes , (array) $attributes );
        return $this;
    }
850696
public function setAttributes($attributes)
    {
        $attributes = self::prepareAttributes($attributes);
        $watched    = array();
        foreach ($this->watchedAttributes as $watchedKey) {
            if (isset($attributes[$watchedKey])) {
                $this->setAttribute($watchedKey, $attributes[$watchedKey]);
                unset($attributes[$watchedKey]);
            } else {
                $this->removeAttribute($watchedKey);
            }
            if (isset($this->attributes[$watchedKey])) {
                $watched[$watchedKey] = $this->attributes[$watchedKey];
            }
        }
        $this->attributes = array_merge($watched, $attributes);
        return $this;
    }
617651
public function setAttribute($attribute, $value)
    {
        if(is_null($value)) {
            unset($this->attributes[$attribute]);
        }
        else {
            $this->attributes[$attribute] = $value;
        }

        return $this;
    }
1337419
protected function checkAttributeAssignable($attribute): void
    {
        if (empty($this->assignable)) {
            return;
        }

        if (is_array($attribute)) {

            foreach ($attribute as $singleAttribute) {
                $this->checkAttributeAssignable($singleAttribute);
            }

            return;
        }

        if ( ! in_array($attribute, $this->assignable)) {
            throw new UnassignableAttributeException("Not allowed to assign value for '{$attribute}'");
        }
    }
1050221
public function merge(self $link)
    {
        $this->parameters = array_replace(
            $link->getParameters(),
            $this->parameters
        );

        $this->metadata = array_replace(
            $link->getMetadata(),
            $this->metadata
        );
    }
813901
public function attribute( $attribute, $value )
    {
        if ( null === $value )
        {
            unset( $this->attributes[ $attribute ] );
        } else {
            $this->attributes[ $attribute ] = $value;
        }

        return $this;
    }
354671
public function addAttributeValue(string $attribute, string $value = ''): self
    {
        // Retrieve the current values of the attribute
        $values = $this->getAttribute($attribute);

        // Merge the values
        if (! in_array($value, $values)) {
            $values[] = $value;
        }

        // Store the new values
        $this->setAttribute($attribute, $values);

        return $this;
    }
1292589
public function removeAttributeValue(string $attribute, string $value): self
    {
        // Only remove value if attribute is present
        if (! array_key_exists($attribute, $this->attributes)) {
            return $this;
        }

        // Remove the value from the attribute
        $values = array_filter(
            $this->getAttribute($attribute),
            function ($attributeValue) use ($value) {
                return $attributeValue !== $value;
            }
        );

        // Stores the new values
        $this->setAttribute($attribute, $values);

        return $this;
    }
1210699
private function mergeAttributes($key, $value)
    {
        $this->dirty = true;
        $this->attributes[$key] = $value;

        return $this;
    }
274418
public function merge(self $definition)
    {
        if ($this->type === null && $definition->hasType()) {
            $this->type = $definition->getType();
        }

        $this->mergeLinks($definition);
        $this->mergeAttributes($definition);
        $this->mergeRelationships($definition);
    }
755736
private function replaceAttributesWithChange()
    {
        if (($change = static::lookupRequestedChange())
            && $change->key == $this->getKey()) {
            $this->attributes = array_merge(
                $this->attributes,
                $this->attributesAtChange($change)
            );
        }
    }
1255555
function addAttribute(Attribute $attribute)
    {
        $attribute->setRelation($this);
        $this->attributes[$attribute->getName()] = $attribute;
        return $this;
    }
1363665
public function merge(self $list) : self
    {
        $oldSize = $this->getSize();
        $combinedSize = $oldSize + $list->getSize();
        $old = $this->list;
        $old->setSize($combinedSize);

        foreach ($old as $index => $val) {
            if ($index > $oldSize - 1) {
                $old[$index] = $list->getList()[($index - $oldSize)];
            }
        }

        return new static($old);
    }