Cast optimization

bc break: no
test pass: yes

I searched for some unneeded casts esp. for `$array[(string) $stringOrInteger]`. But found only a few. When doing so I mainly fixed some phpdocs.