diff --git a/src/pocketmine/command/Command.php b/src/pocketmine/command/Command.php index 33b8a645b..048e80a03 100644 --- a/src/pocketmine/command/Command.php +++ b/src/pocketmine/command/Command.php @@ -114,6 +114,8 @@ abstract class Command{ /** * @param string|null $permission + * + * @return void */ public function setPermission(string $permission = null){ $this->permission = $permission; @@ -259,6 +261,8 @@ abstract class Command{ /** * @param string[] $aliases + * + * @return void */ public function setAliases(array $aliases){ $this->aliases = $aliases; @@ -269,6 +273,8 @@ abstract class Command{ /** * @param string $description + * + * @return void */ public function setDescription(string $description){ $this->description = $description; @@ -276,6 +282,8 @@ abstract class Command{ /** * @param string $permissionMessage + * + * @return void */ public function setPermissionMessage(string $permissionMessage){ $this->permissionMessage = $permissionMessage; @@ -283,6 +291,8 @@ abstract class Command{ /** * @param string $usage + * + * @return void */ public function setUsage(string $usage){ $this->usageMessage = $usage; @@ -292,6 +302,8 @@ abstract class Command{ * @param CommandSender $source * @param TextContainer|string $message * @param bool $sendToSource + * + * @return void */ public static function broadcastCommandMessage(CommandSender $source, $message, bool $sendToSource = true){ if($message instanceof TextContainer){ diff --git a/src/pocketmine/command/CommandMap.php b/src/pocketmine/command/CommandMap.php index 837d6e2bd..a0efb5fa3 100644 --- a/src/pocketmine/command/CommandMap.php +++ b/src/pocketmine/command/CommandMap.php @@ -29,6 +29,8 @@ interface CommandMap{ /** * @param string $fallbackPrefix * @param Command[] $commands + * + * @return void */ public function registerAll(string $fallbackPrefix, array $commands); diff --git a/src/pocketmine/command/CommandReader.php b/src/pocketmine/command/CommandReader.php index a313ade4f..e3829ab09 100644 --- a/src/pocketmine/command/CommandReader.php +++ b/src/pocketmine/command/CommandReader.php @@ -73,6 +73,9 @@ class CommandReader extends Thread{ } } + /** + * @return void + */ public function shutdown(){ $this->shutdown = true; } @@ -96,7 +99,7 @@ class CommandReader extends Thread{ throw new \ThreadException($message); } - private function initStdin(){ + private function initStdin() : void{ if(is_resource(self::$stdin)){ fclose(self::$stdin); } @@ -187,6 +190,9 @@ class CommandReader extends Thread{ return null; } + /** + * @return void + */ public function run(){ $this->registerClassLoader(); diff --git a/src/pocketmine/command/CommandSender.php b/src/pocketmine/command/CommandSender.php index 97fed1b29..17e9c69b5 100644 --- a/src/pocketmine/command/CommandSender.php +++ b/src/pocketmine/command/CommandSender.php @@ -31,6 +31,8 @@ interface CommandSender extends Permissible{ /** * @param TextContainer|string $message + * + * @return void */ public function sendMessage($message); @@ -56,6 +58,8 @@ interface CommandSender extends Permissible{ * Sets the line height used for command output pagination for this command sender. `null` will reset it to default. * * @param int|null $height + * + * @return void */ public function setScreenLineHeight(int $height = null); } diff --git a/src/pocketmine/command/ConsoleCommandSender.php b/src/pocketmine/command/ConsoleCommandSender.php index 090f52c75..5fdc05eee 100644 --- a/src/pocketmine/command/ConsoleCommandSender.php +++ b/src/pocketmine/command/ConsoleCommandSender.php @@ -105,6 +105,8 @@ class ConsoleCommandSender implements CommandSender{ /** * @param TextContainer|string $message + * + * @return void */ public function sendMessage($message){ if($message instanceof TextContainer){ @@ -134,6 +136,8 @@ class ConsoleCommandSender implements CommandSender{ /** * @param bool $value + * + * @return void */ public function setOp(bool $value){ diff --git a/src/pocketmine/command/PluginCommand.php b/src/pocketmine/command/PluginCommand.php index 4c7757b59..6ee4e1926 100644 --- a/src/pocketmine/command/PluginCommand.php +++ b/src/pocketmine/command/PluginCommand.php @@ -70,6 +70,8 @@ class PluginCommand extends Command implements PluginIdentifiableCommand{ /** * @param CommandExecutor $executor + * + * @return void */ public function setExecutor(CommandExecutor $executor){ $this->executor = $executor; diff --git a/src/pocketmine/command/RemoteConsoleCommandSender.php b/src/pocketmine/command/RemoteConsoleCommandSender.php index 054d7ad88..48e33a127 100644 --- a/src/pocketmine/command/RemoteConsoleCommandSender.php +++ b/src/pocketmine/command/RemoteConsoleCommandSender.php @@ -41,6 +41,9 @@ class RemoteConsoleCommandSender extends ConsoleCommandSender{ $this->messages .= trim($message, "\r\n") . "\n"; } + /** + * @return string + */ public function getMessage(){ return $this->messages; } diff --git a/src/pocketmine/command/SimpleCommandMap.php b/src/pocketmine/command/SimpleCommandMap.php index 9f534ff5a..fb3a52a4d 100644 --- a/src/pocketmine/command/SimpleCommandMap.php +++ b/src/pocketmine/command/SimpleCommandMap.php @@ -92,7 +92,7 @@ class SimpleCommandMap implements CommandMap{ $this->setDefaultCommands(); } - private function setDefaultCommands(){ + private function setDefaultCommands() : void{ $this->registerAll("pocketmine", [ new BanCommand("ban"), new BanIpCommand("ban-ip"), diff --git a/src/pocketmine/command/defaults/BanIpCommand.php b/src/pocketmine/command/defaults/BanIpCommand.php index 38c8d5f45..e60b9b219 100644 --- a/src/pocketmine/command/defaults/BanIpCommand.php +++ b/src/pocketmine/command/defaults/BanIpCommand.php @@ -75,7 +75,7 @@ class BanIpCommand extends VanillaCommand{ return true; } - private function processIPBan(string $ip, CommandSender $sender, string $reason){ + private function processIPBan(string $ip, CommandSender $sender, string $reason) : void{ $sender->getServer()->getIPBans()->addBan($ip, $reason, null, $sender->getName()); foreach($sender->getServer()->getOnlinePlayers() as $player){ diff --git a/src/pocketmine/command/defaults/VersionCommand.php b/src/pocketmine/command/defaults/VersionCommand.php index b6140939b..e132671bd 100644 --- a/src/pocketmine/command/defaults/VersionCommand.php +++ b/src/pocketmine/command/defaults/VersionCommand.php @@ -84,7 +84,7 @@ class VersionCommand extends VanillaCommand{ return true; } - private function describeToSender(Plugin $plugin, CommandSender $sender){ + private function describeToSender(Plugin $plugin, CommandSender $sender) : void{ $desc = $plugin->getDescription(); $sender->sendMessage(TextFormat::DARK_GREEN . $desc->getName() . TextFormat::WHITE . " version " . TextFormat::DARK_GREEN . $desc->getVersion());