mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
More typehints, documentation fixes and static analysis cleanup
This commit is contained in:
@ -180,7 +180,7 @@ class CommandReader extends Thread{
|
||||
|
||||
}
|
||||
|
||||
public function getThreadName(){
|
||||
public function getThreadName() : string{
|
||||
return "Console";
|
||||
}
|
||||
}
|
||||
|
@ -64,11 +64,11 @@ class ConsoleCommandSender implements CommandSender{
|
||||
/**
|
||||
* @param Plugin $plugin
|
||||
* @param string $name
|
||||
* @param bool $value
|
||||
* @param bool $value
|
||||
*
|
||||
* @return PermissionAttachment
|
||||
*/
|
||||
public function addAttachment(Plugin $plugin, $name = null, $value = null){
|
||||
public function addAttachment(Plugin $plugin, string $name = null, bool $value = null) : PermissionAttachment{
|
||||
return $this->perm->addAttachment($plugin, $name, $value);
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ class FormattedCommandAlias extends Command{
|
||||
throw new \InvalidArgumentException("Invalid replacement token");
|
||||
}
|
||||
|
||||
$position = (int) (substr($formatString, $argStart, $index));
|
||||
$position = (int) substr($formatString, $argStart, $index);
|
||||
|
||||
if($position === 0){
|
||||
throw new \InvalidArgumentException("Invalid replacement token");
|
||||
|
@ -111,7 +111,7 @@ class TimingsCommand extends VanillaCommand{
|
||||
["page" => "http://paste.ubuntu.com", "extraOpts" => [
|
||||
CURLOPT_HTTPHEADER => ["User-Agent: " . $sender->getServer()->getName() . " " . $sender->getServer()->getPocketMineVersion()],
|
||||
CURLOPT_POST => 1,
|
||||
CURLOPT_POSTFIELDS => $data,
|
||||
CURLOPT_POSTFIELDS => $data
|
||||
]]
|
||||
], $sender) extends BulkCurlTask{
|
||||
public function onCompletion(Server $server){
|
||||
|
Reference in New Issue
Block a user