protected function decode($variable)
    {
        $result = json_decode(base64_decode($variable), true);
        if (json_last_error()) {
            throw new \Exception(
                sprintf('Error decoding JSON, code: %d', json_last_error())
            );
        }

        return $result;
    }
protected function decode($variable)
    {
        $result = json_decode(base64_decode($variable), true);
        if (json_last_error()) {
            throw new \Exception(
                sprintf('Error decoding JSON, code: %d', json_last_error())
            );
        }

        return $result;
    }
protected function decode ( $ variable ) { $ result = json_decode ( base64_decode ( $ variable ) , true ) ; if ( json_last_error ( ) ) { throw new \ Exception ( sprintf ( 'Error decoding JSON, code: %d' , json_last_error ( ) ) ) ; } return $ result ; }
Decodes a Platform.sh environment variable.

@param string $variable
Base64-encoded JSON (the content of an environment variable).

@throws \Exception if there is a JSON decoding error.

@return mixed
An associative array (if representing a JSON object), or a scalar type.
Decodes a Platform . sh environment variable .