Improve getWeightedRandom return type
Improve getWeightedRandom return type

We have a constraint on the return type that it must be the same as
the type of the input array key. We use the `@template` syntax to
achieve this.

Fixes PHPStan warnings of the type:

> Parameter #1 $buildingTypeID of method SmrPlanet::destroyBuilding()
> expects int, int|string given.

hemberger/smr,hemberger/smr,smrealms/smr,smrealms/smr,smrealms/smr,hemberger/smr,hemberger/smr