mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-26 05:14:05 +00:00
SetupWizard: add native void typehints to private methods
This commit is contained in:
parent
07cb603231
commit
9135877da1
@ -128,13 +128,13 @@ LICENSE;
|
||||
return true;
|
||||
}
|
||||
|
||||
private function welcome(){
|
||||
private function welcome() : void{
|
||||
$this->message($this->lang->get("setting_up_server_now"));
|
||||
$this->message($this->lang->get("default_values_info"));
|
||||
$this->message($this->lang->get("server_properties"));
|
||||
}
|
||||
|
||||
private function generateBaseConfig(){
|
||||
private function generateBaseConfig() : void{
|
||||
$config = new Config(\pocketmine\DATA . "server.properties", Config::PROPERTIES);
|
||||
|
||||
$config->set("motd", ($name = $this->getInput($this->lang->get("name_your_server"), self::DEFAULT_NAME)));
|
||||
@ -173,7 +173,7 @@ LICENSE;
|
||||
$config->save();
|
||||
}
|
||||
|
||||
private function generateUserFiles(){
|
||||
private function generateUserFiles() : void{
|
||||
$this->message($this->lang->get("op_info"));
|
||||
|
||||
$op = strtolower($this->getInput($this->lang->get("op_who"), ""));
|
||||
@ -197,7 +197,7 @@ LICENSE;
|
||||
$config->save();
|
||||
}
|
||||
|
||||
private function networkFunctions(){
|
||||
private function networkFunctions() : void{
|
||||
$config = new Config(\pocketmine\DATA . "server.properties", Config::PROPERTIES);
|
||||
$this->error($this->lang->get("query_warning1"));
|
||||
$this->error($this->lang->get("query_warning2"));
|
||||
@ -237,7 +237,7 @@ LICENSE;
|
||||
$this->readLine();
|
||||
}
|
||||
|
||||
private function endWizard(){
|
||||
private function endWizard() : void{
|
||||
$this->message($this->lang->get("you_have_finished"));
|
||||
$this->message($this->lang->get("pocketmine_plugins"));
|
||||
$this->message($this->lang->translateString("pocketmine_will_start", [\pocketmine\NAME]));
|
||||
@ -248,7 +248,7 @@ LICENSE;
|
||||
sleep(4);
|
||||
}
|
||||
|
||||
private function writeLine(string $line = ""){
|
||||
private function writeLine(string $line = "") : void{
|
||||
echo $line . PHP_EOL;
|
||||
}
|
||||
|
||||
@ -256,11 +256,11 @@ LICENSE;
|
||||
return trim((string) fgets(STDIN));
|
||||
}
|
||||
|
||||
private function message(string $message){
|
||||
private function message(string $message) : void{
|
||||
$this->writeLine("[*] " . $message);
|
||||
}
|
||||
|
||||
private function error(string $message){
|
||||
private function error(string $message) : void{
|
||||
$this->writeLine("[!] " . $message);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user