Modernize property declarations in src/world/*

This commit is contained in:
Dylan K. Taylor
2022-04-28 15:06:17 +01:00
parent 159392e738
commit b88a47929f
16 changed files with 116 additions and 215 deletions

View File

@ -32,21 +32,17 @@ abstract class Biome{
public const MAX_BIOMES = 256;
/** @var int */
private $id;
/** @var bool */
private $registered = false;
private int $id;
private bool $registered = false;
/** @var Populator[] */
private $populators = [];
private array $populators = [];
/** @var int */
private $minElevation;
/** @var int */
private $maxElevation;
private int $minElevation;
private int $maxElevation;
/** @var Block[] */
private $groundCover = [];
private array $groundCover = [];
/** @var float */
protected $rainfall = 0.5;

View File

@ -34,7 +34,7 @@ final class BiomeRegistry{
* @var Biome[]|\SplFixedArray
* @phpstan-var \SplFixedArray<Biome>
*/
private $biomes;
private \SplFixedArray $biomes;
public function __construct(){
$this->biomes = new \SplFixedArray(Biome::MAX_BIOMES);

View File

@ -28,9 +28,7 @@ use pocketmine\world\generator\populator\TallGrass;
use pocketmine\world\generator\populator\Tree;
class ForestBiome extends GrassyBiome{
/** @var TreeType */
private $type;
private TreeType $type;
public function __construct(?TreeType $type = null){
parent::__construct();