mirror of
https://github.com/danog/psalm.git
synced 2024-12-04 18:48:03 +01:00
28 lines
253 B
Markdown
28 lines
253 B
Markdown
|
# DuplicateEnumCase
|
||
|
|
||
|
Emitted when enum has duplicate cases.
|
||
|
|
||
|
```php
|
||
|
<?php
|
||
|
|
||
|
enum Status
|
||
|
{
|
||
|
case Open;
|
||
|
case Open;
|
||
|
}
|
||
|
```
|
||
|
|
||
|
## How to fix
|
||
|
|
||
|
Remove or rename the offending duplicates.
|
||
|
|
||
|
```php
|
||
|
<?php
|
||
|
|
||
|
enum Status
|
||
|
{
|
||
|
case Open;
|
||
|
case Closed;
|
||
|
}
|
||
|
```
|