Skip to content
Permalink
Browse files

Fix docs example for impurity

  • Loading branch information...
muglug committed Aug 7, 2019
1 parent 955899a commit 04c12a36fe6e6505b7155a25f58f9ec8df4e02bd
Showing with 12 additions and 1 deletion.
  1. +12 −1 docs/running_psalm/issues.md
@@ -337,9 +337,20 @@ takesString(new A);
Emitted when calling an impure function from a function or method marked as pure.

```php
function impure(array $a) : array {
/** @var int */
static $i = 0;
++$i;
$a[$i] = 1;
return $a;
}
/** @psalm-pure */
function filterOdd(array $a) : void {
extract($a);
impure($a);
}
```

0 comments on commit 04c12a3

Please sign in to comment.
You can’t perform that action at this time.