protected static function dataToString($data)
    {
        if (!is_string($data))
        {
            try
            {
                $data = \GuzzleHttp\json_encode($data);
            }
            catch (\InvalidArgumentException $e)
            {

            }
        }

        return $data;
    }
protected static function dataToString($data)
    {
        if (!is_string($data))
        {
            try
            {
                $data = \GuzzleHttp\json_encode($data);
            }
            catch (\InvalidArgumentException $e)
            {

            }
        }

        return $data;
    }
protected static function dataToString ( $ data ) { if ( ! is_string ( $ data ) ) { try { $ data = \ GuzzleHttp \ json_encode ( $ data ) ; } catch ( \ InvalidArgumentException $ e ) { } } return $ data ; }
Turns data into string,

@param array|string|\stdClass $data

@return string
Turns data into string