Skip to content

Commit eee9e62

Browse files
committed
add/fix phpdoc
1 parent 75aa56b commit eee9e62

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

src/MabeEnum/Enum.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,9 @@ abstract class Enum
4242

4343
/**
4444
* Constructor
45-
*
45+
*
4646
* @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
4948
*/
5049
final private function __construct($value, $ordinal = null)
5150
{
@@ -219,7 +218,7 @@ final static public function getConstants()
219218
/**
220219
* Detect constants available by given class
221220
* @param string $class
222-
* @return void
221+
* @return array
223222
* @throws LogicException On ambiguous constant values
224223
*/
225224
static private function detectConstants($class)

src/MabeEnum/EnumMap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class EnumMap extends SplObjectStorage
7878
* Constructor
7979
* @param string $enumClass The classname of an enumeration the map is for
8080
* @param int|null $flags Behaviour flags, see KEY_AS_* and CURRENT_AS_* constants
81+
* @throws InvalidArgumentException
8182
*/
8283
public function __construct($enumClass, $flags = null)
8384
{

src/MabeEnum/EnumSet.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Iterator;
66
use Countable;
77
use InvalidArgumentException;
8-
use RuntimeException;
98

109
/**
1110
* EnumSet implementation in base of SplObjectStorage
@@ -26,15 +25,32 @@ class EnumSet implements Iterator, Countable
2625
*/
2726
const ORDERED = 2;
2827

28+
/**
29+
* @var string
30+
*/
2931
private $enumClass;
32+
33+
/**
34+
* @var array
35+
*/
3036
private $list = array();
37+
38+
/**
39+
* @var int
40+
*/
3141
private $index = 0;
42+
43+
/**
44+
* @var int
45+
*/
3246
private $flags = self::UNIQUE;
3347

3448
/**
3549
* Constructor
50+
*
3651
* @param string $enumClass The classname of an enumeration the map is for
3752
* @param null|int $flags Flags to define behaviours
53+
* @throws InvalidArgumentException
3854
*/
3955
public function __construct($enumClass, $flags = null)
4056
{

0 commit comments

Comments
 (0)