@@ -25,6 +25,10 @@ |
||
25 | 25 | /** @var string */ |
26 | 26 | protected $value; |
27 | 27 | |
28 | + /** |
|
29 | + * @param string $value |
|
30 | + * @param integer $index |
|
31 | + */ |
|
28 | 32 | public function __construct(?string $value = null, ?int $index = null) |
29 | 33 | { |
30 | 34 | if (is_null($value) && is_null($index)) { |
@@ -2,16 +2,16 @@ |
||
2 | 2 | |
3 | 3 | namespace Spatie\Enum; |
4 | 4 | |
5 | -use TypeError; |
|
6 | -use ReflectionClass; |
|
7 | -use JsonSerializable; |
|
8 | -use ReflectionMethod; |
|
9 | 5 | use ArgumentCountError; |
10 | 6 | use BadMethodCallException; |
11 | -use Spatie\Enum\Exceptions\InvalidIndexException; |
|
12 | -use Spatie\Enum\Exceptions\InvalidValueException; |
|
7 | +use JsonSerializable; |
|
8 | +use ReflectionClass; |
|
9 | +use ReflectionMethod; |
|
13 | 10 | use Spatie\Enum\Exceptions\DuplicatedIndexException; |
14 | 11 | use Spatie\Enum\Exceptions\DuplicatedValueException; |
12 | +use Spatie\Enum\Exceptions\InvalidIndexException; |
|
13 | +use Spatie\Enum\Exceptions\InvalidValueException; |
|
14 | +use TypeError; |
|
15 | 15 | |
16 | 16 | abstract class Enum implements Enumerable, JsonSerializable |
17 | 17 | { |