General type hint cleanup

* Added and fixed some type hints.
* PHPStorm understands `[]` but not `[][]`.
* Calling magic methods like `__toString` is weird should not be done.
* Optimized all imports.
It's the most simple getter you can have. I'm pretty sure either the compiler or the optimizer/accelerator knows this and creates the same byte code anyway. I love micro optimizations, but in this case it's really pointless.