mirror of
https://github.com/danog/psalm.git
synced 2024-12-05 13:10:49 +01:00
16 lines
184 B
Markdown
16 lines
184 B
Markdown
|
# ConstantDeclarationInTrait
|
||
|
|
||
|
Emitted when a trait declares a constant in PHP <8.2.0
|
||
|
|
||
|
```php
|
||
|
<?php
|
||
|
|
||
|
trait A {
|
||
|
const B = 0;
|
||
|
}
|
||
|
```
|
||
|
|
||
|
## Why this is bad
|
||
|
|
||
|
A fatal error will be thrown.
|