remove &$var reference notations in phpdoc

this isn't required by the spec and PHPStan chokes on it. I was previously having it ignore these errors, but it turns out that PHPStan is not making use of extended typeinfo provided if it can't parse the tag, which is problematic on level 6 and also a problem for array-of-type. Therefore, we are going to have to take the hit.
This commit is contained in:
Dylan K. Taylor
2020-01-11 21:20:55 +00:00
parent 0a39e580e9
commit 8794292788
11 changed files with 36 additions and 40 deletions

View File

@ -1778,7 +1778,7 @@ class Level implements ChunkManager, Metadatable{
* It'll try to lower the durability if Item is a tool, and set it to Air if broken.
*
* @param Vector3 $vector
* @param Item &$item (if null, can break anything)
* @param Item $item reference parameter (if null, can break anything)
* @param Player $player
* @param bool $createParticles
*

View File

@ -331,8 +331,8 @@ class McRegion extends BaseLevelProvider{
/**
* @param int $chunkX
* @param int $chunkZ
* @param int &$regionX
* @param int &$regionZ
* @param int $regionX reference parameter
* @param int $regionZ reference parameter
*/
public static function getRegionIndex(int $chunkX, int $chunkZ, &$regionX, &$regionZ){
$regionX = $chunkX >> 5;

View File

@ -244,8 +244,8 @@ class RegionLoader{
/**
* @param int $offset
* @param int &$x
* @param int &$z
* @param int $x reference parameter
* @param int $z reference parameter
*/
protected static function getChunkCoords(int $offset, ?int &$x, ?int &$z) : void{
$x = $offset & 0x1f;