fix PHPStan failures

This commit is contained in:
Dylan K. Taylor 2022-03-09 17:26:05 +00:00
parent 581bbfe255
commit 856fd2a33b
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
3 changed files with 15 additions and 1 deletions

View File

@ -39,7 +39,10 @@ class ConsoleCommandSender implements CommandSender{
/** @var Server */
private $server;
/** @var int|null */
/**
* @var int|null
* @phpstan-var positive-int|null
*/
protected $lineHeight = null;
/** @var Language */
private $language;

View File

@ -253,6 +253,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
protected bool $blockCollision = true;
protected bool $flying = false;
/** @phpstan-var positive-int|null */
protected ?int $lineHeight = null;
protected string $locale = "en_US";

View File

@ -5,6 +5,11 @@ parameters:
count: 1
path: ../../../src/block/BaseBanner.php
-
message: "#^Comparison operation \"\\<\" between int\\<1, max\\> and 1 is always false\\.$#"
count: 1
path: ../../../src/console/ConsoleCommandSender.php
-
message: "#^Method pocketmine\\\\crafting\\\\CraftingManager\\:\\:getDestructorCallbacks\\(\\) should return pocketmine\\\\utils\\\\ObjectSet\\<Closure\\(\\)\\: void\\> but returns pocketmine\\\\utils\\\\ObjectSet\\<Closure\\(\\)\\: void\\>\\|pocketmine\\\\utils\\\\ObjectSet\\<object\\>\\.$#"
count: 1
@ -20,6 +25,11 @@ parameters:
count: 1
path: ../../../src/entity/projectile/Projectile.php
-
message: "#^Comparison operation \"\\<\" between int\\<1, max\\> and 1 is always false\\.$#"
count: 1
path: ../../../src/player/Player.php
-
message: "#^Dead catch \\- RuntimeException is never thrown in the try block\\.$#"
count: 1