Provide a ChunkUtils stub for PHPStan, so it doesn't get confused when the extension is loaded

for some reason the presence of the type problems were reported as
problems on ChunkUtils.php, despite being outside of the project scope
and the errors not applying to the polyfill.
This commit is contained in:
Dylan K. Taylor 2020-02-02 18:12:41 +00:00
parent 663469dfa7
commit 4bc2f28c6d
2 changed files with 27 additions and 0 deletions

View File

@ -20,6 +20,7 @@ parameters:
- pocketmine\DEBUG
stubFiles:
- tests/phpstan/stubs/pthreads.stub
- tests/phpstan/stubs/chunkutils.stub
reportUnmatchedIgnoredErrors: false #no other way to silence platform-specific non-warnings
ignoreErrors:
-

View File

@ -0,0 +1,26 @@
<?php
namespace pocketmine\level\format\io;
class ChunkUtils{
/**
* @param string $byte_array
*
* @return string
*/
public static function reorderByteArray($byte_array){}
/**
* @param string $nibble_array
*
* @return string
*/
public static function reorderNibbleArray($nibble_array){}
/**
* @param int[] $color_array
*
* @return string
*/
public static function convertBiomeColors($color_array){}
}