mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
15 lines
243 B
Markdown
15 lines
243 B
Markdown
# InvalidScalarArgument
|
|
|
|
Emitted when a scalar value is passed to a method that expected another scalar type
|
|
|
|
```php
|
|
<?php
|
|
|
|
function foo(int $i) : void {}
|
|
function bar(string $s) : void {
|
|
if (is_numeric($s)) {
|
|
foo($s);
|
|
}
|
|
}
|
|
```
|