Type hint object parameters - following webtrees-base

https://github.com/fisharebest/webtrees/commit/743fb3a14e7f91a9450c40bbbf9c553edb07e1d6