src/Attributes/AttributionSettable.php
public function setA(StringType $name, Attribute $attribute)
    {
        if ($this->hasA($name)) {
            $this->attributes = $this->attributes->kDiff(
                new AttributeMap([$name() => $attribute])
            );
        }

        $this->attributes = $this->attributes->append([$name() => $attribute]);

        return $this;
    }
public function setA(StringType $name, Attribute $attribute)
    {
        if ($this->hasA($name)) {
            $this->attributes = $this->attributes->kDiff(
                new AttributeMap([$name() => $attribute])
            );
        }

        $this->attributes = $this->attributes->append([$name() => $attribute]);

        return $this;
    }
Set an attribute.  If it exists it will be replaced

@param StringType $name Name of attribute to set
@param Attribute  $attribute Attribute to set

@return Attribution