Closed
Description
Description
The default
option of the match
statement will result in the following error:
No key specified for array entry; first entry specifies key
Code sample
[
'foo' => match ($anything) {
'foo' => 'bar',
default => null,
},
];
Expected behavior
Should not result in an error.
Versions:
- OS: Ubuntu 20.04
- PHP:
8.0
- PHPCS:
3.6.2
- Standard:
Squiz