Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 252 Bytes

ImpurePropertyAssignment.md

File metadata and controls

18 lines (13 loc) · 252 Bytes

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;
}