1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-17 11:56:59 +01:00
psalm/docs/running_psalm/issues/PossiblyFalseArgument.md
Tom Klingenberg ea52b9d23a
Fix minor typos in docs (#3956)
While I was searching for some code, ran across these.
2020-08-08 08:09:41 -04:00

340 B

PossiblyFalseArgument

Emitted when a function argument is possibly false, but the function does not expect false. This is distinct from a function argument is possibly bool, which results in PossiblyInvalidArgument.

<?php

function foo(string $s) : void {
    $a_pos = strpos($s, "a");
    echo substr($s, $a_pos);
}