1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
psalm/docs/running_psalm/issues/ImpurePropertyFetch.md
Matthew Brown 7e13ab9cc9 Fix docs
2020-08-23 13:03:25 -04:00

240 B

ImpurePropertyFetch

Emitted when fetching a property value inside a function or method marked as pure.

<?php

class A {
    public int $a = 5;
}

/** @psalm-pure */
function foo(int $i, A $a) : int {
    return $i + $a->a;
}