Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 603 Bytes

AmbiguousConstantInheritance.md

File metadata and controls

42 lines (33 loc) · 603 Bytes

AmbiguousConstantInheritance

Emitted when a constant is inherited from multiple sources.

<?php

interface Foo
{
    /** @var non-empty-string */
    public const CONSTANT='foo';
}

interface Bar
{
    /**
     * @psalm-suppress OverriddenInterfaceConstant
     * @var non-empty-string
     */
    public const CONSTANT='bar';
}

interface Baz extends Foo, Bar {}
<?php

interface Foo
{
    /** @var non-empty-string */
    public const CONSTANT='foo';
}

class Bar
{
    /** @var non-empty-string */
    public const CONSTANT='bar';
}

class Baz extends Bar implements Foo {}