The HCl is a strong acid, that is, it is fully consumed in the reaction.
HCl(aq) ------------> H₃O⁺(aq) + Cl⁻(aq)
↓ ↓ ↓
1x10⁻⁴ M 0 0
-1 x 10⁻⁴ + 1 x 10⁻⁴ +1 x 10⁻⁴
_____________________________________
0 + 1 x 10⁻⁴ M + 1 x 10⁻⁴ M
PH = - log [ H₃O⁺ ]
PH = - log [ 1 x 10⁻⁴]
PH = 4.0
hope this helps!