Merge branch 'stable'

This commit is contained in:
Dylan K. Taylor 2020-01-09 20:16:17 +00:00
commit 05a450df87
2 changed files with 16 additions and 2 deletions

View File

@ -38,6 +38,10 @@ namespace pocketmine {
const MIN_PHP_VERSION = "7.2.0";
/**
* @param string $message
* @return void
*/
function critical_error($message){
echo "[ERROR] $message" . PHP_EOL;
}
@ -125,6 +129,10 @@ namespace pocketmine {
return $messages;
}
/**
* @param \Logger $logger
* @return void
*/
function emit_performance_warnings(\Logger $logger){
if(extension_loaded("xdebug")){
$logger->warning("Xdebug extension is enabled. This has a major impact on performance.");
@ -137,6 +145,9 @@ namespace pocketmine {
}
}
/**
* @return void
*/
function set_ini_entries(){
ini_set("allow_url_fopen", '1');
ini_set("display_errors", '1');
@ -145,6 +156,9 @@ namespace pocketmine {
ini_set('assert.exception', '1');
}
/**
* @return void
*/
function server(){
if(count($messages = check_platform_dependencies()) > 0){
echo PHP_EOL;

View File

@ -5,8 +5,8 @@ parameters:
checkMissingTypehints: true
rules:
#- PHPStan\Rules\Functions\MissingFunctionParameterTypehintRule
#- PHPStan\Rules\Functions\MissingFunctionReturnTypehintRule
- PHPStan\Rules\Functions\MissingFunctionParameterTypehintRule
- PHPStan\Rules\Functions\MissingFunctionReturnTypehintRule
#- PHPStan\Rules\Methods\MissingMethodParameterTypehintRule
#- PHPStan\Rules\Methods\MissingMethodReturnTypehintRule
- PHPStan\Rules\Properties\MissingPropertyTypehintRule