mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 12:55:26 +01:00
85f2083acb
Fixes vimeo/psalm#6882 Addresses p1 from vimeo/psalm#6471
17 lines
272 B
Markdown
17 lines
272 B
Markdown
# DuplicateConstant
|
||
|
||
Emitted when a constant is defined twice in a single class or when there's a
|
||
clash between a constant and an enum case.
|
||
|
||
```php
|
||
<?php
|
||
class C {
|
||
public const A = 1;
|
||
public const A = 2;
|
||
}
|
||
```
|
||
|
||
## Why this is bad
|
||
|
||
The above code won’t compile.
|