mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Removing list
see https://github.com/vimeo/psalm/pull/8696#issuecomment-1310677110
This commit is contained in:
parent
4d53d26f00
commit
c51d3665eb
@ -24,7 +24,7 @@ This fails since it's not guaranteed that subsequent calls to `$cat->getName()`
|
||||
|
||||
#### Possible Solutions
|
||||
|
||||
* Use a variable:
|
||||
Use a variable:
|
||||
```php
|
||||
<?php
|
||||
|
||||
@ -34,7 +34,8 @@ This fails since it's not guaranteed that subsequent calls to `$cat->getName()`
|
||||
}
|
||||
unset($catName);
|
||||
```
|
||||
* Add [`@psalm-mutation-free`](../../annotating_code/supported_annotations.md#psalm-mutation-free) to the declaration of the function
|
||||
|
||||
Or add [`@psalm-mutation-free`](../../annotating_code/supported_annotations.md#psalm-mutation-free) to the declaration of the function
|
||||
|
||||
### Calling Another Function After `if`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user