More typehints for Command stuff

This commit is contained in:
Dylan K. Taylor
2017-07-05 18:54:36 +01:00
parent 46a2e6cbf8
commit 8bb0c53797
47 changed files with 93 additions and 86 deletions

View File

@ -27,17 +27,19 @@ namespace pocketmine\command;
interface CommandMap{
/**
* @param string $fallbackPrefix
* @param string $fallbackPrefix
* @param Command[] $commands
*/
public function registerAll($fallbackPrefix, array $commands);
public function registerAll(string $fallbackPrefix, array $commands);
/**
* @param string $fallbackPrefix
* @param Command $command
* @param string $label
* @param string $fallbackPrefix
* @param Command $command
* @param string|null $label
*
* @return
*/
public function register($fallbackPrefix, Command $command, $label = null);
public function register(string $fallbackPrefix, Command $command, string $label = null);
/**
* @param CommandSender $sender
@ -55,9 +57,9 @@ interface CommandMap{
/**
* @param string $name
*
* @return Command
* @return Command|null
*/
public function getCommand($name);
public function getCommand(string $name);
}