|null $tileClass */ public function __construct( private int $blockTypeId, private ?string $tileClass = null ){ if($blockTypeId < 0){ throw new \InvalidArgumentException("Block type ID may not be negative"); } if($tileClass !== null){ Utils::testValidInstance($tileClass, Tile::class); } } public function getBlockTypeId() : int{ return $this->blockTypeId; } /** * @phpstan-return class-string|null */ public function getTileClass() : ?string{ return $this->tileClass; } }