pass 2, manual removal of incorrect non-nullable @param for nullable native types

This commit is contained in:
Dylan K. Taylor 2020-01-21 15:44:34 +00:00
parent c4793241f5
commit 9f44adf04a
18 changed files with 0 additions and 53 deletions

View File

@ -216,8 +216,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
/**
* Validates the given username.
*
* @param string $name
*/
public static function isValidUserName(?string $name) : bool{
if($name === null){
@ -661,10 +659,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
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);
}

View File

@ -363,8 +363,6 @@ class BlockFactory{
/**
* Returns a new Block instance with the specified ID, meta and position.
*
* @param Position $pos
*/
public static function get(int $id, int $meta = 0, Position $pos = null) : Block{
if($meta < 0 or $meta > 0xf){

View File

@ -74,7 +74,6 @@ abstract class Command{
public $timings;
/**
* @param string $usageMessage
* @param string[] $aliases
*/
public function __construct(string $name, string $description = "", string $usageMessage = null, array $aliases = []){

View File

@ -61,10 +61,6 @@ class ConsoleCommandSender implements CommandSender{
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);
}

View File

@ -57,7 +57,6 @@ class Skin{
/**
* @deprecated
* @return bool
*/
public function isValid() : bool{
try{

View File

@ -33,9 +33,6 @@ class EntityEffectAddEvent extends EntityEffectEvent{
/** @var EffectInstance|null */
private $oldEffect;
/**
* @param EffectInstance $oldEffect
*/
public function __construct(Entity $entity, EffectInstance $effect, EffectInstance $oldEffect = null){
parent::__construct($entity, $effect);
$this->oldEffect = $oldEffect;

View File

@ -55,8 +55,6 @@ abstract class BaseInventory implements Inventory{
/**
* @param Item[] $items
* @param int $size
* @param string $title
*/
public function __construct(array $items = [], int $size = null, string $title = null){
$this->slots = new \SplFixedArray($size ?? $this->getDefaultSize());

View File

@ -1643,8 +1643,6 @@ class Level implements ChunkManager, Metadatable{
}
/**
* @param Vector3 $motion
*
* @return ItemEntity|null
*/
public function dropItem(Vector3 $source, Item $item, Vector3 $motion = null, int $delay = 10){
@ -1725,7 +1723,6 @@ class Level implements ChunkManager, Metadatable{
* It'll try to lower the durability if Item is a tool, and set it to Air if broken.
*
* @param Item $item reference parameter (if null, can break anything)
* @param Player $player
*/
public function useBreakOn(Vector3 $vector, Item &$item = null, Player $player = null, bool $createParticles = false) : bool{
$target = $this->getBlock($vector);
@ -1995,8 +1992,6 @@ class Level implements ChunkManager, Metadatable{
/**
* Returns the entities near the current one inside the AxisAlignedBB
*
* @param Entity $entity
*
* @return Entity[]
*/
public function getNearbyEntities(AxisAlignedBB $bb, Entity $entity = null) : array{

View File

@ -38,7 +38,6 @@ class Location extends Position{
* @param float|int $z
* @param float $yaw
* @param float $pitch
* @param Level $level
*/
public function __construct($x = 0, $y = 0, $z = 0, $yaw = 0.0, $pitch = 0.0, Level $level = null){
$this->yaw = $yaw;
@ -47,7 +46,6 @@ class Location extends Position{
}
/**
* @param Level|null $level default null
* @param float $yaw default 0.0
* @param float $pitch default 0.0
*/

View File

@ -36,7 +36,6 @@ class Position extends Vector3{
* @param float|int $x
* @param float|int $y
* @param float|int $z
* @param Level $level
*/
public function __construct($x = 0, $y = 0, $z = 0, Level $level = null){
parent::__construct($x, $y, $z);

View File

@ -94,11 +94,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());

View File

@ -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;

View File

@ -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;
/**

View File

@ -85,9 +85,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()){

View File

@ -143,8 +143,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 = []){

View File

@ -202,8 +202,6 @@ class PluginManager{
}
/**
* @param array $newLoaders
*
* @return Plugin[]
*/
public function loadPlugins(string $directory, array $newLoaders = null){

View File

@ -154,9 +154,6 @@ class TimingsHandler{
/** @var int */
private $violations = 0;
/**
* @param TimingsHandler $parent
*/
public function __construct(string $name, TimingsHandler $parent = null){
$this->name = $name;
$this->parent = $parent;

View File

@ -59,8 +59,6 @@ class UUID{
/**
* Creates an UUID from an hexadecimal representation
*
* @param int $version
*/
public static function fromString(string $uuid, int $version = null) : UUID{
return self::fromBinary(hex2bin(str_replace("-", "", trim($uuid))), $version);
@ -69,8 +67,6 @@ class UUID{
/**
* Creates an UUID from a binary representation
*
* @param int $version
*
* @throws \InvalidArgumentException
*/
public static function fromBinary(string $uuid, int $version = null) : UUID{