Slick.php
/**
     * Prepares the result of a listener as an ack response body.
     *
     * @param mixed $data
     * @return string
     */
Prepares the result of a listener as an ack response body.
@param mixed $data
@return string
Prepares the result of a listener as an ack response body . @param mixed $data @return string
private function prepareAck($data = null): string
    {
        if ($data === null) {
            return '';
        }
        if (is_string($data)) {
            $data = ['text' => $data];
        }
        try {
            return json_encode($data, JSON_THROW_ON_ERROR);
        } catch (JsonException $err) {
            self::err('ack', 'Invalid JSON while encoding ack', 500);
        }
    }
private function prepareAck ( $ data = null ) : string { if ( $ data === null ) { return '' ; } if ( is_string ( $ data ) ) { $ data = [ 'text' => $ data ] ; } try { return json_encode ( $ data , JSON_THROW_ON_ERROR ) ; } catch ( JsonException $ err ) { self :: err ( 'ack' , 'Invalid JSON while encoding ack' , 500 ) ; } }
Prepares the result of a listener as an ack response body.
Prepares the result of a listener as an ack response body .