File tree Expand file tree Collapse file tree 3 files changed +21
-5
lines changed Expand file tree Collapse file tree 3 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,9 @@ abstract class Enum
42
42
43
43
/**
44
44
* Constructor
45
- *
45
+ *
46
46
* @param scalar $value The value to select
47
- * @throws InvalidArgumentException On an unknwon or invalid value
48
- * @throws LogicException On ambiguous constant values
47
+ * @param int|null $ordinal
49
48
*/
50
49
final private function __construct ($ value , $ ordinal = null )
51
50
{
@@ -219,7 +218,7 @@ final static public function getConstants()
219
218
/**
220
219
* Detect constants available by given class
221
220
* @param string $class
222
- * @return void
221
+ * @return array
223
222
* @throws LogicException On ambiguous constant values
224
223
*/
225
224
static private function detectConstants ($ class )
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ class EnumMap extends SplObjectStorage
78
78
* Constructor
79
79
* @param string $enumClass The classname of an enumeration the map is for
80
80
* @param int|null $flags Behaviour flags, see KEY_AS_* and CURRENT_AS_* constants
81
+ * @throws InvalidArgumentException
81
82
*/
82
83
public function __construct ($ enumClass , $ flags = null )
83
84
{
Original file line number Diff line number Diff line change 5
5
use Iterator ;
6
6
use Countable ;
7
7
use InvalidArgumentException ;
8
- use RuntimeException ;
9
8
10
9
/**
11
10
* EnumSet implementation in base of SplObjectStorage
@@ -26,15 +25,32 @@ class EnumSet implements Iterator, Countable
26
25
*/
27
26
const ORDERED = 2 ;
28
27
28
+ /**
29
+ * @var string
30
+ */
29
31
private $ enumClass ;
32
+
33
+ /**
34
+ * @var array
35
+ */
30
36
private $ list = array ();
37
+
38
+ /**
39
+ * @var int
40
+ */
31
41
private $ index = 0 ;
42
+
43
+ /**
44
+ * @var int
45
+ */
32
46
private $ flags = self ::UNIQUE ;
33
47
34
48
/**
35
49
* Constructor
50
+ *
36
51
* @param string $enumClass The classname of an enumeration the map is for
37
52
* @param null|int $flags Flags to define behaviours
53
+ * @throws InvalidArgumentException
38
54
*/
39
55
public function __construct ($ enumClass , $ flags = null )
40
56
{
You can’t perform that action at this time.
0 commit comments