The effect of environment on type Ia supernovae in the dark energy survey