pass 2, manual removal of incorrect non-nullable phpdoc types

This commit is contained in:
Dylan K. Taylor 2020-01-22 12:06:47 +00:00
parent 67bcc1c0fb
commit 1b33143f4f
15 changed files with 0 additions and 48 deletions

View File

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

View File

@ -38,7 +38,6 @@ class Location extends Position{
* @param float|int $x * @param float|int $x
* @param float|int $y * @param float|int $y
* @param float|int $z * @param float|int $z
* @param World $world
*/ */
public function __construct($x = 0, $y = 0, $z = 0, float $yaw = 0.0, float $pitch = 0.0, ?World $world = null){ public function __construct($x = 0, $y = 0, $z = 0, float $yaw = 0.0, float $pitch = 0.0, ?World $world = null){
$this->yaw = $yaw; $this->yaw = $yaw;
@ -47,10 +46,6 @@ class Location extends Position{
} }
/** /**
* @param World|null $world default null
* @param float $yaw default 0.0
* @param float $pitch default 0.0
*
* @return Location * @return Location
*/ */
public static function fromObject(Vector3 $pos, ?World $world = null, float $yaw = 0.0, float $pitch = 0.0){ public static function fromObject(Vector3 $pos, ?World $world = null, float $yaw = 0.0, float $pitch = 0.0){

View File

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

View File

@ -85,11 +85,6 @@ class BanList{
$this->save(); $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{ public function addBan(string $target, ?string $reason = null, ?\DateTime $expires = null, ?string $source = null) : BanEntry{
$entry = new BanEntry($target); $entry = new BanEntry($target);
$entry->setSource($source ?? $entry->getSource()); $entry->setSource($source ?? $entry->getSource());

View File

@ -26,9 +26,6 @@ namespace pocketmine\permission;
abstract class DefaultPermissions{ abstract class DefaultPermissions{
public const ROOT = "pocketmine"; public const ROOT = "pocketmine";
/**
* @param Permission $parent
*/
public static function registerPermission(Permission $perm, ?Permission $parent = null) : Permission{ public static function registerPermission(Permission $perm, ?Permission $parent = null) : Permission{
if($parent instanceof Permission){ if($parent instanceof Permission){
$parent->getChildren()[$perm->getName()] = true; $parent->getChildren()[$perm->getName()] = true;

View File

@ -41,10 +41,6 @@ interface Permissible extends ServerOperator{
*/ */
public function hasPermission($name) : bool; 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 addAttachment(Plugin $plugin, ?string $name = null, ?bool $value = null) : PermissionAttachment;
public function removeAttachment(PermissionAttachment $attachment) : void; public function removeAttachment(PermissionAttachment $attachment) : void;

View File

@ -91,9 +91,6 @@ class PermissibleBase implements Permissible{
/** /**
* //TODO: tick scheduled attachments * //TODO: tick scheduled attachments
*
* @param string $name
* @param bool $value
*/ */
public function addAttachment(Plugin $plugin, ?string $name = null, ?bool $value = null) : PermissionAttachment{ public function addAttachment(Plugin $plugin, ?string $name = null, ?bool $value = null) : PermissionAttachment{
if(!$plugin->isEnabled()){ if(!$plugin->isEnabled()){

View File

@ -44,10 +44,6 @@ trait PermissibleDelegateTrait{
return $this->perm->hasPermission($name); return $this->perm->hasPermission($name);
} }
/**
* @param string $name
* @param bool $value
*/
public function addAttachment(Plugin $plugin, ?string $name = null, ?bool $value = null) : PermissionAttachment{ public function addAttachment(Plugin $plugin, ?string $name = null, ?bool $value = null) : PermissionAttachment{
return $this->perm->addAttachment($plugin, $name, $value); return $this->perm->addAttachment($plugin, $name, $value);
} }

View File

@ -56,8 +56,6 @@ class Permission{
/** /**
* Creates a new Permission object to be attached to Permissible objects * Creates a new Permission object to be attached to Permissible objects
* *
* @param string $description
* @param string $defaultValue
* @param bool[] $children * @param bool[] $children
*/ */
public function __construct(string $name, ?string $description = null, ?string $defaultValue = null, array $children = []){ public function __construct(string $name, ?string $description = null, ?string $defaultValue = null, array $children = []){

View File

@ -136,8 +136,6 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
/** /**
* Validates the given username. * Validates the given username.
*
* @param string $name
*/ */
public static function isValidUserName(?string $name) : bool{ public static function isValidUserName(?string $name) : bool{
if($name === null){ if($name === null){

View File

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

View File

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

View File

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

View File

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

View File

@ -1379,9 +1379,6 @@ class World implements ChunkManager{
$this->timings->setBlock->stopTiming(); $this->timings->setBlock->stopTiming();
} }
/**
* @param Vector3 $motion
*/
public function dropItem(Vector3 $source, Item $item, ?Vector3 $motion = null, int $delay = 10) : ?ItemEntity{ public function dropItem(Vector3 $source, Item $item, ?Vector3 $motion = null, int $delay = 10) : ?ItemEntity{
if($item->isNull()){ if($item->isNull()){
return null; return null;
@ -1432,7 +1429,6 @@ class World implements ChunkManager{
* It'll try to lower the durability if Item is a tool, and set it to Air if broken. * 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 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{ public function useBreakOn(Vector3 $vector, Item &$item = null, ?Player $player = null, bool $createParticles = false) : bool{
$vector = $vector->floor(); $vector = $vector->floor();
@ -1686,8 +1682,6 @@ class World implements ChunkManager{
/** /**
* Returns the entities near the current one inside the AxisAlignedBB * Returns the entities near the current one inside the AxisAlignedBB
* *
* @param Entity $entity
*
* @return Entity[] * @return Entity[]
*/ */
public function getNearbyEntities(AxisAlignedBB $bb, ?Entity $entity = null) : array{ public function getNearbyEntities(AxisAlignedBB $bb, ?Entity $entity = null) : array{