src/Payload.php
public function setCustomValue(string $key, $value): Payload
    {
        if ($key === self::PAYLOAD_ROOT_KEY) {
            throw InvalidPayloadException::reservedKey();
        }

        $this->customValues[$key] = $value;

        return $this;
    }
public function setCustomValue(string $key, $value): Payload
    {
        if ($key === self::PAYLOAD_ROOT_KEY) {
            throw InvalidPayloadException::reservedKey();
        }

        $this->customValues[$key] = $value;

        return $this;
    }
public function setCustomValue ( string $ key , $ value ) : Payload { if ( $ key === self :: PAYLOAD_ROOT_KEY ) { throw InvalidPayloadException :: reservedKey ( ) ; } $ this -> customValues [ $ key ] = $ value ; return $ this ; }
Set custom value for Payload.

@param string $key
@param mixed $value
@return Payload
@throws InvalidPayloadException
Set custom value for Payload .