small fixes

Fixed following small issues:

- Redundant closing tag
- Unreachable statements
- Updated PHPDoc
- Duplicate array key
- Expression result unused
- Missing 'break' statement
- The left and the right parts of assignment are equal
- $args as an int val to sum 1