We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4079b53 commit e6a0fe0Copy full SHA for e6a0fe0
docs/running_psalm/issues/InvalidArgument.md
@@ -6,6 +6,35 @@ Emitted when a supplied function/method argument is incompatible with the method
6
<?php
7
8
class A {}
9
+
10
+function foo(A $a) : void {}
11
12
+/**
13
+ * @param string $s
14
+ */
15
+function callFoo($s) : void {
16
+ foo($s);
17
+}
18
+```
19
20
+## Why it’s bad
21
22
+Calling functions with incorrect values will cause a fatal error at runtime.
23
24
+## How to fix
25
26
+Sometimes this message can just be the result of an incorrect docblock.
27
28
+You can fix by correcting the docblock, or converting to a function signature:
29
30
+```php
31
+<?php
32
33
+class A {}
34
35
function foo(A $a) : void {}
-foo("hello");
36
37
+function callFoo(A $a) : void {
38
+ foo($a);
39
40
```
0 commit comments