mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Modernize property declarations in pocketmine\command namespace
This commit is contained in:
parent
72cff0ee11
commit
dca457b1e0
@ -40,23 +40,18 @@ use function str_replace;
|
||||
|
||||
abstract class Command{
|
||||
|
||||
/** @var string */
|
||||
private $name;
|
||||
private string $name;
|
||||
|
||||
/** @var string */
|
||||
private $nextLabel;
|
||||
|
||||
/** @var string */
|
||||
private $label;
|
||||
private string $nextLabel;
|
||||
private string $label;
|
||||
|
||||
/** @var string[] */
|
||||
private $aliases = [];
|
||||
private array $aliases = [];
|
||||
|
||||
/** @var string[] */
|
||||
private $activeAliases = [];
|
||||
private array $activeAliases = [];
|
||||
|
||||
/** @var CommandMap|null */
|
||||
private $commandMap = null;
|
||||
private ?CommandMap $commandMap = null;
|
||||
|
||||
/** @var Translatable|string */
|
||||
protected $description = "";
|
||||
@ -64,11 +59,8 @@ abstract class Command{
|
||||
/** @var Translatable|string */
|
||||
protected $usageMessage;
|
||||
|
||||
/** @var string|null */
|
||||
private $permission = null;
|
||||
|
||||
/** @var string|null */
|
||||
private $permissionMessage = null;
|
||||
private ?string $permission = null;
|
||||
private ?string $permissionMessage = null;
|
||||
|
||||
/** @var TimingsHandler|null */
|
||||
public $timings = null;
|
||||
|
@ -33,7 +33,7 @@ use function substr;
|
||||
|
||||
class FormattedCommandAlias extends Command{
|
||||
/** @var string[] */
|
||||
private $formatStrings = [];
|
||||
private array $formatStrings = [];
|
||||
|
||||
/**
|
||||
* @param string[] $formatStrings
|
||||
|
@ -31,8 +31,7 @@ use pocketmine\plugin\PluginOwnedTrait;
|
||||
final class PluginCommand extends Command implements PluginOwned{
|
||||
use PluginOwnedTrait;
|
||||
|
||||
/** @var CommandExecutor */
|
||||
private $executor;
|
||||
private CommandExecutor $executor;
|
||||
|
||||
public function __construct(string $name, Plugin $owner, CommandExecutor $executor){
|
||||
parent::__construct($name);
|
||||
|
@ -84,11 +84,7 @@ class SimpleCommandMap implements CommandMap{
|
||||
/** @var Command[] */
|
||||
protected $knownCommands = [];
|
||||
|
||||
/** @var Server */
|
||||
private $server;
|
||||
|
||||
public function __construct(Server $server){
|
||||
$this->server = $server;
|
||||
public function __construct(private Server $server){
|
||||
$this->setDefaultCommands();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user