Skip to content

Commit

Permalink
Mass removal of useless @param/@return PHPDoc annotations, pass 1
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Jan 21, 2020
1 parent 7532c60 commit c479324
Show file tree
Hide file tree
Showing 322 changed files with 0 additions and 5,360 deletions.
14 changes: 0 additions & 14 deletions src/pocketmine/Achievement.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,6 @@ abstract class Achievement{

];


/**
* @param Player $player
* @param string $achievementId
*
* @return bool
*/
public static function broadcast(Player $player, string $achievementId) : bool{
if(isset(Achievement::$list[$achievementId])){
$translation = new TranslationContainer("chat.type.achievement", [$player->getDisplayName(), TextFormat::GREEN . Achievement::$list[$achievementId]["name"] . TextFormat::RESET]);
Expand All @@ -128,13 +121,6 @@ public static function broadcast(Player $player, string $achievementId) : bool{
return false;
}

/**
* @param string $achievementId
* @param string $achievementName
* @param array $requires
*
* @return bool
*/
public static function add(string $achievementId, string $achievementName, array $requires = []) : bool{
if(!isset(Achievement::$list[$achievementId])){
Achievement::$list[$achievementId] = [
Expand Down
19 changes: 0 additions & 19 deletions src/pocketmine/IPlayer.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,20 @@

interface IPlayer extends ServerOperator{

/**
* @return bool
*/
public function isOnline() : bool;

/**
* @return string
*/
public function getName() : string;

/**
* @return bool
*/
public function isBanned() : bool;

/**
* @param bool $banned
*
* @return void
*/
public function setBanned(bool $banned);

/**
* @return bool
*/
public function isWhitelisted() : bool;

/**
* @param bool $value
*
* @return void
*/
public function setWhitelisted(bool $value);
Expand All @@ -76,9 +60,6 @@ public function getFirstPlayed();
*/
public function getLastPlayed();

/**
* @return bool
*/
public function hasPlayedBefore() : bool;

}
29 changes: 0 additions & 29 deletions src/pocketmine/MemoryManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,26 +169,16 @@ private function init() : void{
gc_enable();
}

/**
* @return bool
*/
public function isLowMemory() : bool{
return $this->lowMemory;
}

/**
* @return bool
*/
public function canUseChunkCache() : bool{
return !$this->lowMemory or !$this->lowMemDisableChunkCache;
}

/**
* Returns the allowed chunk radius based on the current memory usage.
*
* @param int $distance
*
* @return int
*/
public function getViewDistance(int $distance) : int{
return ($this->lowMemory and $this->lowMemChunkRadiusOverride > 0) ? (int) min($this->lowMemChunkRadiusOverride, $distance) : $distance;
Expand All @@ -197,11 +187,6 @@ public function getViewDistance(int $distance) : int{
/**
* Triggers garbage collection and cache cleanup to try and free memory.
*
* @param int $memory
* @param int $limit
* @param bool $global
* @param int $triggerCount
*
* @return void
*/
public function trigger(int $memory, int $limit, bool $global = false, int $triggerCount = 0){
Expand Down Expand Up @@ -272,9 +257,6 @@ public function check(){
Timings::$memoryManagerTimer->stopTiming();
}

/**
* @return int
*/
public function triggerGarbageCollector() : int{
Timings::$garbageCollectorTimer->startTiming();

Expand All @@ -298,10 +280,6 @@ public function triggerGarbageCollector() : int{
/**
* Dumps the server memory into the specified output folder.
*
* @param string $outputFolder
* @param int $maxNesting
* @param int $maxStringSize
*
* @return void
*/
public function dumpServerMemory(string $outputFolder, int $maxNesting, int $maxStringSize){
Expand All @@ -320,10 +298,6 @@ public function dumpServerMemory(string $outputFolder, int $maxNesting, int $max
* Static memory dumper accessible from any thread.
*
* @param mixed $startingObject
* @param string $outputFolder
* @param int $maxNesting
* @param int $maxStringSize
* @param \Logger $logger
*
* @return void
* @throws \ReflectionException
Expand Down Expand Up @@ -482,9 +456,6 @@ public static function dumpMemory($startingObject, string $outputFolder, int $ma
* @param mixed $data reference parameter
* @param object[] $objects reference parameter
* @param int[] $refCounts reference parameter
* @param int $recursion
* @param int $maxNesting
* @param int $maxStringSize
*/
private static function continueDump($from, &$data, array &$objects, array &$refCounts, int $recursion, int $maxNesting, int $maxStringSize) : void{
if($maxNesting <= 0){
Expand Down
4 changes: 0 additions & 4 deletions src/pocketmine/OfflinePlayer.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ class OfflinePlayer implements IPlayer, Metadatable{
/** @var CompoundTag|null */
private $namedtag = null;

/**
* @param Server $server
* @param string $name
*/
public function __construct(Server $server, string $name){
$this->server = $server;
$this->name = $name;
Expand Down
Loading

0 comments on commit c479324

Please sign in to comment.