TelnetClient.php: Rename STATE_NORMAL to STATE_DEFAULT
TelnetClient.php: Refactor the state machine out of waitForData()
TelnetClient.php: Modify header: it is safe to say that I rewrote more than modified the original code
TelnetClient.php: Add STATE_CMD, split command handling into processStateMachineCmdState()
TelnetClient.php: Enable command state processing
TelnetClient.php: Add FIXMEs
TelnetClient.php: Use self::getCmdStr() instead of bin2hex()
TelnetClient.php: Remove stripPromptFromBuffer() and getBuffer()
TelnetClient.php: Cosmetic fix/cleanup
TelnetClient.php: Add phpdoc, use ErrorException instead of Exception in some places
TelnetClient.php: Use a namespace, use Exception subclasses
TelnetClient.php: Bugfixes
TelnetClient.php: Lowercase all PHP special scalars

I prefer it and I rewrote the whole thing anyway
But, most importantly, it is consistent with the casing used by phpdoc
TelnetClient.php: Enforce strict parameter checking in ctor
TelnetClient.php: Fix InvalidArgumentException
TelnetClient.php: Add TODOs and other comment fixes
TelnetClient.php: Check fwrite() return value, closing a FIXME
TelnetClient.php: Don't append the commands to the global buffer for now
TelnetClient.php: Use array type hints
TelnetClient.php: Use strict checking on preg_match() call in waitPrompt()