RegionLoader: specify type of unpack() return

PHPStan has no idea what is going on in this code because unpack() returns mixed[].
Possibly it might be a good idea to implement a dynamic return type extension for this.
This commit is contained in:
Dylan K. Taylor 2020-09-11 20:48:37 +01:00
parent 4a88db7f43
commit 114df07622

View File

@ -303,6 +303,7 @@ class RegionLoader{
throw new CorruptedRegionException("Corrupted region header (unexpected end of file)");
}
/** @var int[] $data */
$data = unpack("N*", $headerRaw);
for($i = 0; $i < 1024; ++$i){