Remove vestigal __toString.
Bracket the already indented conditionals, standardize simple guard clauses as one-liners.
"empty() is essentially the concise equivalent to !isset($var)"
Move comments in hasMessages() to clarify what exactly they're describing.