Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Commit 7830110

Browse files
author
Petr Knap
committed
Improved phpDoc
1 parent 0f19e31 commit 7830110

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/Enum/AbstractEnum.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ public static function __callStatic($memberName, array $args)
7878
}
7979

8080
/**
81+
* Returns member name
82+
*
8183
* @return string
8284
*/
8385
public function getName()
@@ -86,6 +88,8 @@ public function getName()
8688
}
8789

8890
/**
91+
* Returns member value
92+
*
8993
* @return mixed
9094
*/
9195
public function getValue()
@@ -94,12 +98,20 @@ public function getValue()
9498
}
9599

96100
/**
101+
* Generates and returns members of enum as associative array (keys are names and values are values)
102+
*
103+
* NOTE: Can not be merged with static {@link getMembers()} due to its abstraction.
104+
*
97105
* @return mixed[] [first_name => first_value, second_name => second_value,...]
98106
*/
99107
abstract protected function members();
100108

101109
/**
102-
* @return mixed[]
110+
* Returns members of enum
111+
*
112+
* NOTE: Can not be merged with non-static {@link members()} due to its inner logic
113+
*
114+
* @return mixed[] [first_name => first_value, second_name => second_value,...]
103115
*/
104116
public static function getMembers()
105117
{

0 commit comments

Comments
 (0)