Interferencing intensity in two Bose–Einstein condensates with Josephson-like coupling