Is this legal?

Is it legal to install a sediment trap linearly like this? My journeyman says its fine but the HVAC guy says no. In indiana.

Is it legal to install a sediment trap linearly like this? My journeyman says its fine but the HVAC guy says no. In indiana.