Fixing code as in PSR-1 and PSR-2 guidelines #1

The following issues are fixed:
- indentation [PSR-2] Code must use 4 spaces for indenting, not tabs.
- linefeed [PSR-2] All PHP files must use the Unix LF (linefeed) line ending.
- trailing_spaces [PSR-2] Remove trailing whitespace at the end of
  lines.
- short_tag [PSR-1] PHP code must use the long tags or the short-echo
  tags; it must not use the other tag variations.
- braces [PSR-2] Opening braces for classes, interfaces, traits and
  methods must go on the next line, and closing braces must go on the
  next line after the body. Opening braces for control structures must
  go on the same line, and closing braces must go on the next line after
  the body.
- php_closing_tag [PSR-2] The closing ?> tag MUST be omitted from files
  containing only PHP.
- eof_ending [PSR-2] A file must always end with an empty line feed.
- visibility [PSR-2] Visibility must be declared on all properties and methods;
  abstract and final must be declared before the visibility; static must be
  declared after the visibility.
- return [all] An empty line feed should precede a return statement.
- extra_empty_lines [all] Removes extra empty lines.
- controls_spaces [all] A single space should be between: the closing brace
  and the control, the control and the opening parenthese, the closing
  parenthese and the opening brace.
- elseif [PSR-2] The keyword elseif should be used instead of else if so that
  all control keywords looks like single words.
- include [all] Include and file path should be divided with a single space.
  File path should not be placed under brackets.