I think this is a weird return format; the 2nd value is always just array() - isn't it something the caller should handle, that if it's only a string it really means [$string, []] ?

Or at least just return [$sql]