PM attacked on ministerial code