mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 12:24:49 +01:00
Add documentation for new issue
This commit is contained in:
parent
da43b8188f
commit
0f659d996d
@ -179,6 +179,7 @@
|
||||
<xs:element name="ImplementedParamTypeMismatch" type="IssueHandlerType" minOccurs="0" />
|
||||
<xs:element name="ImplementedReturnTypeMismatch" type="IssueHandlerType" minOccurs="0" />
|
||||
<xs:element name="ImplicitToStringCast" type="IssueHandlerType" minOccurs="0" />
|
||||
<xs:element name="ImpureByReferenceAssignment" type="IssueHandlerType" minOccurs="0" />
|
||||
<xs:element name="ImpureFunctionCall" type="IssueHandlerType" minOccurs="0" />
|
||||
<xs:element name="ImpureMethodCall" type="IssueHandlerType" minOccurs="0" />
|
||||
<xs:element name="ImpurePropertyAssignment" type="IssueHandlerType" minOccurs="0" />
|
||||
|
@ -332,6 +332,20 @@ function takesString(string $s) : void {}
|
||||
takesString(new A);
|
||||
```
|
||||
|
||||
### ImpureByReferenceAssignment
|
||||
|
||||
Emitted when assigning a passed-by-reference variable inside a function or method marked as mutation-free.
|
||||
|
||||
```php
|
||||
/**
|
||||
* @psalm-pure
|
||||
*/
|
||||
function foo(string &$a): string {
|
||||
$a = "B";
|
||||
return $a;
|
||||
}
|
||||
```
|
||||
|
||||
### ImpureFunctionCall
|
||||
|
||||
Emitted when calling an impure function from a function or method marked as pure.
|
||||
|
Loading…
Reference in New Issue
Block a user