1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-15 02:47:02 +01:00
psalm/docs/running_psalm/issues/ImpureVariable.md
2020-08-23 18:37:46 -04:00

255 B

ImpureVariable

Emitted when referencing an impure or possibly-impure variable from a pure context.

<?php

class A {
    public int $a = 5;

    /**
     * @psalm-pure
     */
    public function foo() : self {
        return $this;
    }
}