NSW minister sacked for breach of ministerial code