CrashDump: add void native return types to private methods

This commit is contained in:
Dylan K. Taylor 2020-01-17 13:55:38 +00:00
parent bac788fd00
commit c22576a266

View File

@ -145,7 +145,7 @@ class CrashDump{
return $this->data; return $this->data;
} }
private function encodeData(){ private function encodeData() : void{
$this->addLine(); $this->addLine();
$this->addLine("----------------------REPORT THE DATA BELOW THIS LINE-----------------------"); $this->addLine("----------------------REPORT THE DATA BELOW THIS LINE-----------------------");
$this->addLine(); $this->addLine();
@ -161,7 +161,7 @@ class CrashDump{
$this->addLine("===END CRASH DUMP==="); $this->addLine("===END CRASH DUMP===");
} }
private function pluginsData(){ private function pluginsData() : void{
if($this->server->getPluginManager() instanceof PluginManager){ if($this->server->getPluginManager() instanceof PluginManager){
$this->addLine(); $this->addLine();
$this->addLine("Loaded plugins:"); $this->addLine("Loaded plugins:");
@ -185,7 +185,7 @@ class CrashDump{
} }
} }
private function extraData(){ private function extraData() : void{
global $argv; global $argv;
if($this->server->getProperty("auto-report.send-settings", true) !== false){ if($this->server->getProperty("auto-report.send-settings", true) !== false){
@ -212,7 +212,7 @@ class CrashDump{
} }
} }
private function baseCrash(){ private function baseCrash() : void{
global $lastExceptionError, $lastError; global $lastExceptionError, $lastError;
if(isset($lastExceptionError)){ if(isset($lastExceptionError)){
@ -320,7 +320,7 @@ class CrashDump{
return false; return false;
} }
private function generalData(){ private function generalData() : void{
$version = new VersionString(\pocketmine\BASE_VERSION, \pocketmine\IS_DEVELOPMENT_BUILD, \pocketmine\BUILD_NUMBER); $version = new VersionString(\pocketmine\BASE_VERSION, \pocketmine\IS_DEVELOPMENT_BUILD, \pocketmine\BUILD_NUMBER);
$this->data["general"] = []; $this->data["general"] = [];
$this->data["general"]["name"] = $this->server->getName(); $this->data["general"]["name"] = $this->server->getName();