mirror of
https://github.com/danog/psalm.git
synced 2024-12-05 13:10:49 +01:00
12 lines
277 B
Markdown
12 lines
277 B
Markdown
# InvalidLiteralArgument
|
|
|
|
Emitted when a literal argument is passed where a variable is expected, such as the first argument of `strpos`, where an explicit `$haystack` is almost always unintended.
|
|
|
|
```php
|
|
<?php
|
|
|
|
function foo(string $s) : void {
|
|
echo strpos(".", $s);
|
|
}
|
|
```
|