From 5920b0ba40603b87c15af4e085cd2eab3d830ef1 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 27 Dec 2020 19:10:40 +0000 Subject: [PATCH] Remove _PHPSTAN_ANALYSIS constant we don't need this anymore since PHPStan is able to intelligently decide whether to autoload a file or not. --- build/make-release.php | 5 +---- build/server-phar.php | 5 +---- src/pocketmine/PocketMine.php | 4 +--- tests/phpstan/bootstrap.php | 2 -- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/build/make-release.php b/build/make-release.php index 94c01d906..2cb13f169 100644 --- a/build/make-release.php +++ b/build/make-release.php @@ -24,7 +24,6 @@ declare(strict_types=1); namespace pocketmine\build\make_release; use pocketmine\utils\VersionString; -use function defined; use function dirname; use function fgets; use function file_get_contents; @@ -86,6 +85,4 @@ function main(array $argv) : void{ system('git push origin HEAD ' . $currentVer->getBaseVersion()); } -if(!defined('pocketmine\_PHPSTAN_ANALYSIS')){ - main($argv); -} +main($argv); diff --git a/build/server-phar.php b/build/server-phar.php index 90cf6aec0..ed9200d35 100644 --- a/build/server-phar.php +++ b/build/server-phar.php @@ -26,7 +26,6 @@ namespace pocketmine\build\server_phar; use pocketmine\utils\Git; use function array_map; use function count; -use function defined; use function dirname; use function file_exists; use function getcwd; @@ -174,6 +173,4 @@ STUB } } -if(!defined('pocketmine\_PHPSTAN_ANALYSIS')){ - main(); -} +main(); diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index cb98bf017..776541201 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -299,7 +299,5 @@ namespace pocketmine { exit($exitCode); } - if(!defined('pocketmine\_PHPSTAN_ANALYSIS')){ - \pocketmine\server(); - } + \pocketmine\server(); } diff --git a/tests/phpstan/bootstrap.php b/tests/phpstan/bootstrap.php index ddbe9b703..8073199f0 100644 --- a/tests/phpstan/bootstrap.php +++ b/tests/phpstan/bootstrap.php @@ -21,8 +21,6 @@ declare(strict_types=1); -define('pocketmine\_PHPSTAN_ANALYSIS', true); - if(!defined('LEVELDB_ZLIB_RAW_COMPRESSION')){ //leveldb might not be loaded define('LEVELDB_ZLIB_RAW_COMPRESSION', 4);