redwallhp/MCServerStatus — pull request #5 by TheLonelyGhost (2012-12-01 09:52:00+00:00)
Title: Refactoring and improving error handling

See the detailed descriptions of the three included commits. Essentially:

- there was some leftover code in the demo from when Exception was included
- checking contents of `$hostname` within the constructor didn't make sense, so it was moved to `setHostname()`
- added regular expression to check `$hostname` if port was included
- added regular expression to check `$hostname` if protocol was included
- added string input handling to `setPort()`
- minor refactoring of code in Stats to reduce repetition