mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 05:34:54 +00:00
Fixed build
This commit is contained in:
parent
0358b7dce4
commit
357dfb5c7e
@ -506,8 +506,8 @@ class Config{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string[] $entries
|
* @param string[]|int[] $entries
|
||||||
* @phpstan-param list<string> $entries
|
* @phpstan-param list<int|string> $entries
|
||||||
*/
|
*/
|
||||||
public static function writeList(array $entries) : string{
|
public static function writeList(array $entries) : string{
|
||||||
return implode("\n", $entries);
|
return implode("\n", $entries);
|
||||||
@ -515,11 +515,11 @@ class Config{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string[]|int[]|float[]|bool[] $config
|
* @param string[]|int[]|float[]|bool[] $config
|
||||||
* @phpstan-param array<string, string|int|float|bool> $config
|
* @phpstan-param array<int|string, string|int|float|bool> $config
|
||||||
*/
|
*/
|
||||||
public static function writeProperties(array $config) : string{
|
public static function writeProperties(array $config) : string{
|
||||||
$content = "#Properties Config file\r\n#" . date("D M j H:i:s T Y") . "\r\n";
|
$content = "#Properties Config file\r\n#" . date("D M j H:i:s T Y") . "\r\n";
|
||||||
foreach(Utils::stringifyKeys($config) as $k => $v){
|
foreach(Utils::promoteKeys($config) as $k => $v){
|
||||||
if(is_bool($v)){
|
if(is_bool($v)){
|
||||||
$v = $v ? "on" : "off";
|
$v = $v ? "on" : "off";
|
||||||
}
|
}
|
||||||
@ -531,7 +531,7 @@ class Config{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string[]|int[]|float[]|bool[]
|
* @return string[]|int[]|float[]|bool[]
|
||||||
* @phpstan-return array<string, string|int|float|bool>
|
* @phpstan-return array<int|string, string|int|float|bool>
|
||||||
*/
|
*/
|
||||||
public static function parseProperties(string $content) : array{
|
public static function parseProperties(string $content) : array{
|
||||||
$result = [];
|
$result = [];
|
||||||
|
@ -1364,7 +1364,7 @@ class World implements ChunkManager{
|
|||||||
* TODO: phpstan can't infer these types yet :(
|
* TODO: phpstan can't infer these types yet :(
|
||||||
* @phpstan-var array<int, LightArray> $blockLight
|
* @phpstan-var array<int, LightArray> $blockLight
|
||||||
* @phpstan-var array<int, LightArray> $skyLight
|
* @phpstan-var array<int, LightArray> $skyLight
|
||||||
* @phpstan-var array<int, int> $heightMap
|
* @phpstan-var non-empty-list<int> $heightMap
|
||||||
*/
|
*/
|
||||||
if($this->unloaded || ($chunk = $this->getChunk($chunkX, $chunkZ)) === null || $chunk->isLightPopulated() === true){
|
if($this->unloaded || ($chunk = $this->getChunk($chunkX, $chunkZ)) === null || $chunk->isLightPopulated() === true){
|
||||||
return;
|
return;
|
||||||
|
@ -791,7 +791,7 @@ parameters:
|
|||||||
path: ../../../src/utils/Config.php
|
path: ../../../src/utils/Config.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#1 \\$config of static method pocketmine\\\\utils\\\\Config\\:\\:writeProperties\\(\\) expects array\\<string, bool\\|float\\|int\\|string\\>, array\\<string, mixed\\> given\\.$#"
|
message: "#^Parameter \\#1 \\$config of static method pocketmine\\\\utils\\\\Config\\:\\:writeProperties\\(\\) expects array\\<int\\|string, bool\\|float\\|int\\|string\\>, array\\<int\\|string, mixed\\> given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: ../../../src/utils/Config.php
|
path: ../../../src/utils/Config.php
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ parameters:
|
|||||||
path: ../../../src/world/format/Chunk.php
|
path: ../../../src/world/format/Chunk.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Method pocketmine\\\\world\\\\format\\\\HeightArray\\:\\:getValues\\(\\) should return array\\<int, int\\> but returns array\\<int, int\\|null\\>\\.$#"
|
message: "#^Method pocketmine\\\\world\\\\format\\\\HeightArray\\:\\:getValues\\(\\) should return non\\-empty\\-array\\<int, int\\> but returns array\\<int, int\\|null\\>\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: ../../../src/world/format/HeightArray.php
|
path: ../../../src/world/format/HeightArray.php
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user