mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 00:25:04 +00:00
phpdoc armageddon for master, pass 1
This commit is contained in:
@ -32,8 +32,6 @@ trait EnumTrait{
|
||||
/**
|
||||
* Registers the given object as an enum member.
|
||||
*
|
||||
* @param self $member
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
protected static function register(self $member) : void{
|
||||
@ -77,9 +75,6 @@ trait EnumTrait{
|
||||
* Returns the enum member matching the given name.
|
||||
* This is overridden to change the return typehint.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return self
|
||||
* @throws \InvalidArgumentException if no member matches.
|
||||
*/
|
||||
public static function fromString(string $name) : self{
|
||||
@ -95,7 +90,6 @@ trait EnumTrait{
|
||||
private $runtimeId;
|
||||
|
||||
/**
|
||||
* @param string $enumName
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
private function __construct(string $enumName){
|
||||
@ -110,9 +104,6 @@ trait EnumTrait{
|
||||
$this->runtimeId = self::$nextId++;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function name() : string{
|
||||
return $this->enumName;
|
||||
}
|
||||
@ -121,8 +112,6 @@ trait EnumTrait{
|
||||
* Returns a runtime-only identifier for this enum member. This will be different with each run, so don't try to
|
||||
* hardcode it.
|
||||
* This can be useful for switches or array indexing.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function id() : int{
|
||||
return $this->runtimeId;
|
||||
@ -130,10 +119,6 @@ trait EnumTrait{
|
||||
|
||||
/**
|
||||
* Returns whether the two objects are equivalent.
|
||||
*
|
||||
* @param self $other
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function equals(self $other) : bool{
|
||||
return $this->enumName === $other->enumName;
|
||||
|
Reference in New Issue
Block a user