mirror of
https://github.com/danog/psalm.git
synced 2024-12-03 10:07:52 +01:00
19 lines
252 B
Markdown
19 lines
252 B
Markdown
# ImpurePropertyAssignment
|
|
|
|
Emitted when updating a property value from a function or method marked as pure.
|
|
|
|
```php
|
|
<?php
|
|
|
|
class A {
|
|
public int $a = 5;
|
|
}
|
|
|
|
/** @psalm-pure */
|
|
function foo(int $i, A $a) : int {
|
|
$a->a = $i;
|
|
|
|
return $i;
|
|
}
|
|
```
|