Improved phpdocs, better IDE typehinting

Improved phpdocs, better IDE typehinting