Fixed uninitialized typed properties

This commit is contained in:
Dylan K. Taylor 2022-06-06 17:23:10 +01:00
parent 2a24982bc4
commit b57f0a2b7e
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
3 changed files with 5 additions and 5 deletions

View File

@ -48,8 +48,8 @@ use function intdiv;
* results, with no remainder. Any leftovers are expected to be emitted back to the crafting grid.
*/
class CraftingTransaction extends InventoryTransaction{
protected ?CraftingRecipe $recipe;
protected ?int $repetitions;
protected ?CraftingRecipe $recipe = null;
protected ?int $repetitions = null;
/** @var Item[] */
protected array $inputs = [];

View File

@ -30,7 +30,7 @@ use function error_reporting;
trait CommonThreadPartsTrait{
/** @var \Threaded|\ClassLoader[]|null */
private ?\Threaded $classLoaders = null;
protected ?string $composerAutoloaderPath;
protected ?string $composerAutoloaderPath = null;
protected bool $isKilled = false;

View File

@ -28,8 +28,8 @@ use pocketmine\world\format\Chunk;
use pocketmine\world\format\SubChunk;
class SubChunkExplorer{
public ?Chunk $currentChunk;
public ?SubChunk $currentSubChunk;
public ?Chunk $currentChunk = null;
public ?SubChunk $currentSubChunk = null;
protected int $currentX;
protected int $currentY;