code cleanup, fixes

* fix a warning thrown by stupid php imap library
* fix phpdoc
* fix whitespaces