src/Serializer/Context/MutableSerializationContext.php
public function set(string $key, $value): MutableSerializationContext
    {
        $cloned = clone $this;

        $cloned->payload[$key] = $value;

        return $cloned;
    }
public function set(string $key, $value): MutableSerializationContext
    {
        $cloned = clone $this;

        $cloned->payload[$key] = $value;

        return $cloned;
    }
public function set ( string $ key , $ value ) : MutableSerializationContext { $ cloned = clone $ this ; $ cloned -> payload [ $ key ] = $ value ; return $ cloned ; }
Set the new key-value to context

@param string $key
@param mixed  $value

@return MutableSerializationContext
Set the new key - value to context