Back to Psalm

InvalidConstantAssignmentValue

docs/running_psalm/issues/InvalidConstantAssignmentValue.md

6.16.1209 B
Original Source

InvalidConstantAssignmentValue

Emitted when attempting to assign a value to a class constant that cannot contain that type.

php
<?php

class Foo {
    /** @var int */
    public const BAR = "bar";
}