1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-05 13:10:49 +01:00
psalm/docs/running_psalm/issues/DuplicateConstant.md
2021-11-11 00:44:17 +02:00

17 lines
272 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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 wont compile.