PasswordHash::hashPassword was overly complex
Fix some phpmd warnings