Invalid Assertion::eq evaluation
simPod opened this issue · 3 comments
simPod commented
private function first()
{
$var = getenv('env');
Assertion::eq($var, 'value');
$this->second($var);
}
private function second(string $needsString)
{
}Returns
Parameter #1 $needsString of method ::second() expects string, string|false given.
Even though we know the possible set of types for $var is string when passed into second(). Or am I wrong?
ondrejmirtes commented
Is eq the equivalent to == or ===? Anyway, adding another assertion to string() will not kill you ;)
simPod commented
I see, there's ::same method ;) thanks
github-actions commented
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.