1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-05 13:10:49 +01:00
psalm/docs/running_psalm/issues/ImpurePropertyFetch.md

17 lines
240 B
Markdown
Raw Normal View History

2020-08-23 19:03:25 +02:00
# ImpurePropertyFetch
Emitted when fetching a property value inside a function or method marked as pure.
```php
<?php
class A {
public int $a = 5;
}
/** @psalm-pure */
function foo(int $i, A $a) : int {
return $i + $a->a;
}
```