mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 12:04:46 +00:00
pass 2, manual removal of incorrect non-nullable phpdoc types
This commit is contained in:
@@ -85,11 +85,6 @@ class BanList{
|
||||
$this->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $reason
|
||||
* @param \DateTime $expires
|
||||
* @param string $source
|
||||
*/
|
||||
public function addBan(string $target, ?string $reason = null, ?\DateTime $expires = null, ?string $source = null) : BanEntry{
|
||||
$entry = new BanEntry($target);
|
||||
$entry->setSource($source ?? $entry->getSource());
|
||||
|
@@ -26,9 +26,6 @@ namespace pocketmine\permission;
|
||||
abstract class DefaultPermissions{
|
||||
public const ROOT = "pocketmine";
|
||||
|
||||
/**
|
||||
* @param Permission $parent
|
||||
*/
|
||||
public static function registerPermission(Permission $perm, ?Permission $parent = null) : Permission{
|
||||
if($parent instanceof Permission){
|
||||
$parent->getChildren()[$perm->getName()] = true;
|
||||
|
@@ -41,10 +41,6 @@ interface Permissible extends ServerOperator{
|
||||
*/
|
||||
public function hasPermission($name) : bool;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param bool $value
|
||||
*/
|
||||
public function addAttachment(Plugin $plugin, ?string $name = null, ?bool $value = null) : PermissionAttachment;
|
||||
|
||||
public function removeAttachment(PermissionAttachment $attachment) : void;
|
||||
|
@@ -91,9 +91,6 @@ class PermissibleBase implements Permissible{
|
||||
|
||||
/**
|
||||
* //TODO: tick scheduled attachments
|
||||
*
|
||||
* @param string $name
|
||||
* @param bool $value
|
||||
*/
|
||||
public function addAttachment(Plugin $plugin, ?string $name = null, ?bool $value = null) : PermissionAttachment{
|
||||
if(!$plugin->isEnabled()){
|
||||
|
@@ -44,10 +44,6 @@ trait PermissibleDelegateTrait{
|
||||
return $this->perm->hasPermission($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param bool $value
|
||||
*/
|
||||
public function addAttachment(Plugin $plugin, ?string $name = null, ?bool $value = null) : PermissionAttachment{
|
||||
return $this->perm->addAttachment($plugin, $name, $value);
|
||||
}
|
||||
|
@@ -56,8 +56,6 @@ class Permission{
|
||||
/**
|
||||
* Creates a new Permission object to be attached to Permissible objects
|
||||
*
|
||||
* @param string $description
|
||||
* @param string $defaultValue
|
||||
* @param bool[] $children
|
||||
*/
|
||||
public function __construct(string $name, ?string $description = null, ?string $defaultValue = null, array $children = []){
|
||||
|
Reference in New Issue
Block a user