mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
fixing some PHPStan complaints about bootstrap
this isn't an ideal fix, but it'll do.
This commit is contained in:
parent
95812252d6
commit
932418b951
58
phpstan.neon
58
phpstan.neon
@ -2,6 +2,9 @@
|
||||
|
||||
parameters:
|
||||
level: 1
|
||||
autoload_files:
|
||||
- tests/phpstan/bootstrap.php
|
||||
- src/pocketmine/PocketMine.php
|
||||
paths:
|
||||
- src
|
||||
reportUnmatchedIgnoredErrors: false #no other way to silence platform-specific non-warnings
|
||||
@ -10,61 +13,6 @@ parameters:
|
||||
message: "#^pocketmine\\\\Player\\:\\:__construct\\(\\) does not call parent constructor from pocketmine\\\\entity\\\\Human\\.$#"
|
||||
path: src/pocketmine/Player.php
|
||||
|
||||
-
|
||||
message: "#^Function pocketmine\\\\critical_error not found while trying to analyse it \\- autoloading is probably not configured properly\\.$#"
|
||||
count: 1
|
||||
path: src/pocketmine/PocketMine.php
|
||||
|
||||
-
|
||||
message: "#^Function pocketmine\\\\check_platform_dependencies not found while trying to analyse it \\- autoloading is probably not configured properly\\.$#"
|
||||
count: 1
|
||||
path: src/pocketmine/PocketMine.php
|
||||
|
||||
-
|
||||
message: "#^Function pocketmine\\\\emit_performance_warnings not found while trying to analyse it \\- autoloading is probably not configured properly\\.$#"
|
||||
count: 1
|
||||
path: src/pocketmine/PocketMine.php
|
||||
|
||||
-
|
||||
message: "#^Function pocketmine\\\\set_ini_entries not found while trying to analyse it \\- autoloading is probably not configured properly\\.$#"
|
||||
count: 1
|
||||
path: src/pocketmine/PocketMine.php
|
||||
|
||||
-
|
||||
message: "#^Function pocketmine\\\\server not found while trying to analyse it \\- autoloading is probably not configured properly\\.$#"
|
||||
count: 1
|
||||
path: src/pocketmine/PocketMine.php
|
||||
|
||||
-
|
||||
message: "#^Function check_platform_dependencies not found\\.$#"
|
||||
count: 1
|
||||
path: src/pocketmine/PocketMine.php
|
||||
|
||||
-
|
||||
message: "#^Function critical_error not found\\.$#"
|
||||
count: 6
|
||||
path: src/pocketmine/PocketMine.php
|
||||
|
||||
-
|
||||
message: "#^Function set_ini_entries not found\\.$#"
|
||||
count: 1
|
||||
path: src/pocketmine/PocketMine.php
|
||||
|
||||
-
|
||||
message: "#^Function emit_performance_warnings not found\\.$#"
|
||||
count: 1
|
||||
path: src/pocketmine/PocketMine.php
|
||||
|
||||
-
|
||||
message: "#^Function pocketmine\\\\server not found\\.$#"
|
||||
count: 1
|
||||
path: src/pocketmine/PocketMine.php
|
||||
|
||||
-
|
||||
message: "#^Constant MIN_PHP_VERSION not found\\.$#"
|
||||
count: 2
|
||||
path: src/pocketmine/PocketMine.php
|
||||
|
||||
-
|
||||
message: "#^pocketmine\\\\block\\\\[A-Za-z\\d]+\\:\\:__construct\\(\\) does not call parent constructor from pocketmine\\\\block\\\\Block\\.$#"
|
||||
path: src/pocketmine/block
|
||||
|
@ -291,5 +291,7 @@ namespace pocketmine {
|
||||
exit($exitCode);
|
||||
}
|
||||
|
||||
\pocketmine\server();
|
||||
if(!defined('pocketmine\_PHPSTAN_ANALYSIS')){
|
||||
\pocketmine\server();
|
||||
}
|
||||
}
|
||||
|
24
tests/phpstan/bootstrap.php
Normal file
24
tests/phpstan/bootstrap.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
define('pocketmine\_PHPSTAN_ANALYSIS', true);
|
Loading…
x
Reference in New Issue
Block a user