Skip to content

Commit 8e434db

Browse files
committed
fix implicitly nullable via default value null
1 parent 6614011 commit 8e434db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/EnumMap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class EnumMap implements ArrayAccess, Countable, IteratorAggregate
4242
* @param null|iterable<T|null|bool|int|float|string|array<mixed>, mixed> $map Initialize map
4343
* @throws InvalidArgumentException
4444
*/
45-
public function __construct(string $enumeration, iterable $map = null)
45+
public function __construct(string $enumeration, ?iterable $map = null)
4646
{
4747
if (!\is_subclass_of($enumeration, Enum::class)) {
4848
throw new InvalidArgumentException(\sprintf(

src/EnumSet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class EnumSet implements IteratorAggregate, Countable
8686
* @param iterable<T|null|bool|int|float|string|array<mixed>>|null $enumerators iterable list of enumerators initializing the set
8787
* @throws InvalidArgumentException
8888
*/
89-
public function __construct(string $enumeration, iterable $enumerators = null)
89+
public function __construct(string $enumeration, ?iterable $enumerators = null)
9090
{
9191
if (!\is_subclass_of($enumeration, Enum::class)) {
9292
throw new InvalidArgumentException(\sprintf(

0 commit comments

Comments
 (0)