Follow Horde 4 Coding Standards

Fix curly if-braces on the wrong line, wrong indention, missing PHP 5
visibility specifiers, wrong order of properties and functions etc.
Typo