From 29301614e8adb4040b961cd673278daeb6c4601e Mon Sep 17 00:00:00 2001 From: ipad54 <63200545+ipad54@users.noreply.github.com> Date: Fri, 4 Nov 2022 23:23:56 +0300 Subject: [PATCH 1/3] Remove dead comments (#5389) --- src/entity/Entity.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/entity/Entity.php b/src/entity/Entity.php index be44a0433..be4bfa4e1 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -988,9 +988,7 @@ abstract class Entity{ $this->timings->stopTiming(); - //if($this->isStatic()) return ($hasUpdate || $this->hasMovementUpdate()); - //return !($this instanceof Player); } final public function scheduleUpdate() : void{ From c19880e045e3d76baa4e3398ea279d319719998e Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 4 Nov 2022 20:50:27 +0000 Subject: [PATCH 2/3] bootstrap: fix PHPStan error --- src/PocketMine.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/PocketMine.php b/src/PocketMine.php index d3493f9f1..d84cf50a2 100644 --- a/src/PocketMine.php +++ b/src/PocketMine.php @@ -209,12 +209,10 @@ JIT_WARNING } if(is_array($opts[$opt])){ critical_error("Cannot specify --$opt multiple times"); - exit(1); - } - if($opts[$opt] === false){ + }else{ critical_error("Missing value for --$opt"); - exit(1); } + exit(1); } return null; } From ed452b9ccdd11f5168d8df7b63d43a11193cc851 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 4 Nov 2022 20:51:22 +0000 Subject: [PATCH 3/3] Scrub PHPStan baselines --- tests/phpstan/configs/actual-problems.neon | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tests/phpstan/configs/actual-problems.neon b/tests/phpstan/configs/actual-problems.neon index 1121cd134..0afae17b6 100644 --- a/tests/phpstan/configs/actual-problems.neon +++ b/tests/phpstan/configs/actual-problems.neon @@ -15,21 +15,11 @@ parameters: count: 1 path: ../../../build/server-phar.php - - - message: "#^Binary operation \"\\.\" between array\\\\|string\\|false and '/'\\|'\\\\\\\\' results in an error\\.$#" - count: 2 - path: ../../../src/PocketMine.php - - message: "#^Do\\-while loop condition is always false\\.$#" count: 1 path: ../../../src/PocketMine.php - - - message: "#^Cannot cast mixed to string\\.$#" - count: 1 - path: ../../../src/Server.php - - message: "#^Parameter \\#1 \\$array of static method pocketmine\\\\plugin\\\\PluginGraylist\\:\\:fromArray\\(\\) expects array, mixed given\\.$#" count: 1