mirror of
https://github.com/danog/psalm.git
synced 2024-12-05 21:19:03 +01:00
20 lines
285 B
Markdown
20 lines
285 B
Markdown
|
# OverriddenFinalConstant
|
||
|
|
||
|
Emitted when a constant declared as final is overridden in a child class or interface.
|
||
|
|
||
|
```php
|
||
|
<?php
|
||
|
|
||
|
class Foo
|
||
|
{
|
||
|
/** @var string */
|
||
|
final public const BAR='baz';
|
||
|
}
|
||
|
|
||
|
class Bar extends Foo
|
||
|
{
|
||
|
/** @var string */
|
||
|
public const BAR='foobar';
|
||
|
}
|
||
|
```
|