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