vimeo/psalm
Psalm is a powerful PHP static analysis tool that finds type errors and bugs before runtime. Install via Composer, configure for your codebase, and run it locally or try the live demo at psalm.dev. Docs and integrations available for teams and CI.
Emitted when a scalar value is passed to a method that expected another scalar type.
This is only emitted in situations where Psalm can be sure that PHP tries to coerce one scalar type to another.
In all other cases InvalidArgument is emitted.
<?php
function foo(int $i) : void {}
function bar(string $s) : void {
if (is_numeric($s)) {
foo($s);
}
}
How can I help you explore Laravel packages today?