Fix doc blocks consistency and coding standards PSR2

Use "bool" instead of "boolean" and "int" instead of "integer" in doc blocks for consistency.
Also fix coding standards PSR2 as elseif and spaces.