1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 09:47:29 +01:00
psalm/docs/running_psalm/issues/InvalidScalarArgument.md

15 lines
243 B
Markdown
Raw Normal View History

2020-03-19 17:32:49 +01:00
# InvalidScalarArgument
Emitted when a scalar value is passed to a method that expected another scalar type
```php
2020-03-21 00:13:46 +01:00
<?php
2020-03-19 17:32:49 +01:00
function foo(int $i) : void {}
function bar(string $s) : void {
if (is_numeric($s)) {
foo($s);
}
}
```