@@ -28,6 +28,9 @@  | 
                                                    ||
| 28 | 28 | /** @var string */  | 
                                                        
| 29 | 29 | protected $name;  | 
                                                        
| 30 | 30 | |
| 31 | + /**  | 
                                                        |
| 32 | + * @param string $name  | 
                                                        |
| 33 | + */  | 
                                                        |
| 31 | 34 | public function __construct(?string $name = null, ?string $value = null, ?int $index = null)  | 
                                                        
| 32 | 35 |      { | 
                                                        
| 33 | 36 |          if (is_null($name) && is_null($value) && is_null($index)) { | 
                                                        
@@ -2,17 +2,17 @@  | 
                                                    ||
| 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\InvalidNameException;  | 
                                                        |
| 12 | -use Spatie\Enum\Exceptions\InvalidIndexException;  | 
                                                        |
| 13 | -use Spatie\Enum\Exceptions\InvalidValueException;  | 
                                                        |
| 7 | +use JsonSerializable;  | 
                                                        |
| 8 | +use ReflectionClass;  | 
                                                        |
| 9 | +use ReflectionMethod;  | 
                                                        |
| 14 | 10 | use Spatie\Enum\Exceptions\DuplicatedIndexException;  | 
                                                        
| 15 | 11 | use Spatie\Enum\Exceptions\DuplicatedValueException;  | 
                                                        
| 12 | +use Spatie\Enum\Exceptions\InvalidIndexException;  | 
                                                        |
| 13 | +use Spatie\Enum\Exceptions\InvalidNameException;  | 
                                                        |
| 14 | +use Spatie\Enum\Exceptions\InvalidValueException;  | 
                                                        |
| 15 | +use TypeError;  | 
                                                        |
| 16 | 16 | |
| 17 | 17 | abstract class Enum implements Enumerable, JsonSerializable  | 
                                                        
| 18 | 18 |  { |