Josephson tunnelling of a phase-imprinted Bose–Einstein condensate in a time-dependent double-well potential