@@ -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 Spatie\Enum\Exceptions\InvalidNameException; |
|
6 | -use TypeError; |
|
7 | -use ReflectionClass; |
|
8 | -use JsonSerializable; |
|
9 | -use ReflectionMethod; |
|
10 | 5 | use ArgumentCountError; |
11 | 6 | use BadMethodCallException; |
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 | { |