1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
psalm/docs/running_psalm/issues/ImpurePropertyAssignment.md
Matthew Brown 8589e4af55
Fix docs
2021-01-29 11:38:41 +01:00

252 B

ImpurePropertyAssignment

Emitted when updating a property value from a function or method marked as pure.

<?php

class A {
    public int $a = 5;
}

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

    return $i;
}