mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 01:16:15 +00:00
phpdoc armageddon for master, pass 1
This commit is contained in:
@ -161,12 +161,6 @@ abstract class Timings{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param TaskHandler $task
|
||||
* @param int $period
|
||||
*
|
||||
* @return TimingsHandler
|
||||
*/
|
||||
public static function getScheduledTaskTimings(TaskHandler $task, int $period) : TimingsHandler{
|
||||
$name = "Task: " . ($task->getOwnerName() ?? "Unknown") . " Runnable: " . $task->getTaskName();
|
||||
|
||||
@ -183,11 +177,6 @@ abstract class Timings{
|
||||
return self::$pluginTaskTimingMap[$name];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Entity $entity
|
||||
*
|
||||
* @return TimingsHandler
|
||||
*/
|
||||
public static function getEntityTimings(Entity $entity) : TimingsHandler{
|
||||
$entityType = (new \ReflectionClass($entity))->getShortName();
|
||||
if(!isset(self::$entityTypeTimingMap[$entityType])){
|
||||
@ -201,11 +190,6 @@ abstract class Timings{
|
||||
return self::$entityTypeTimingMap[$entityType];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Tile $tile
|
||||
*
|
||||
* @return TimingsHandler
|
||||
*/
|
||||
public static function getTileEntityTimings(Tile $tile) : TimingsHandler{
|
||||
$tileType = (new \ReflectionClass($tile))->getShortName();
|
||||
if(!isset(self::$tileEntityTypeTimingMap[$tileType])){
|
||||
@ -215,11 +199,6 @@ abstract class Timings{
|
||||
return self::$tileEntityTypeTimingMap[$tileType];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ServerboundPacket $pk
|
||||
*
|
||||
* @return TimingsHandler
|
||||
*/
|
||||
public static function getReceiveDataPacketTimings(ServerboundPacket $pk) : TimingsHandler{
|
||||
$pid = $pk->pid();
|
||||
if(!isset(self::$packetReceiveTimingMap[$pid])){
|
||||
@ -230,12 +209,6 @@ abstract class Timings{
|
||||
return self::$packetReceiveTimingMap[$pid];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param ClientboundPacket $pk
|
||||
*
|
||||
* @return TimingsHandler
|
||||
*/
|
||||
public static function getSendDataPacketTimings(ClientboundPacket $pk) : TimingsHandler{
|
||||
$pid = $pk->pid();
|
||||
if(!isset(self::$packetSendTimingMap[$pid])){
|
||||
|
@ -147,7 +147,6 @@ class TimingsHandler{
|
||||
private $violations = 0;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param TimingsHandler $parent
|
||||
*/
|
||||
public function __construct(string $name, ?TimingsHandler $parent = null){
|
||||
@ -200,8 +199,6 @@ class TimingsHandler{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Closure $closure
|
||||
*
|
||||
* @return mixed the result of the given closure
|
||||
*/
|
||||
public function time(\Closure $closure){
|
||||
|
Reference in New Issue
Block a user