phpstan/phpstan-beberlei-assert

Assert::that conditions are not working as expected

meridius opened this issue · 0 comments

Given this case https://phpstan.org/r/ea5dfda5-33b6-49e7-8e5f-1db4214533e4 I'd expect that method withAssertwill work just like withIf. PhpStan will however throw following error

Offset 'host' does not exist on false|array('scheme' => string, ?'host' => string, ?'port' => int, ?'user' => string, ?'pass' => string, ?'query' => string, ?'fragment' => string). |

I know that phpstan/phpstan-beberlei-assert is not integrated in the web-tester, but the same will happen locally when it is.