Style clean up, typo fixes, phpdoc fixes, unused use fixes

Hi! I've cleaned up the codebase the following ways:

- Replaced all tabs with four spaces
- Fixed a few typo's
- Fixed a few phpdocs (e.g.: missing `@throws` and invalid `@param` tags)
- Removed some unused use lines (a lot of uses where the class was already in the same namespace)
- Ensured a return on the last line

I've change nothing to the workings of the code itself, but was only trying to make the code style a lot more consistent.

Sadly, the project contains no unit tests. These would have helped me a lot if they existed to ensure that I broke nothing. You might want to consider adding these, because it would make it a lot easier to try some stuff and then run the test to find out if something went wrong. However, to make this codebase more testable, it would be best reorganize the code and seperate the concerns a bit more, or else writing a test would be a lot more work than writing a class.