1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
psalm/docs/running_psalm/issues/InvalidLiteralArgument.md

12 lines
277 B
Markdown
Raw Permalink Normal View History

# InvalidLiteralArgument
2020-09-11 04:58:26 +02:00
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);
}
```