phpstan/phpstan-nette

Nette Tester Asserts

hrach opened this issue · 6 comments

hrach commented

I'm trying to run PhpStan on my test cases. Currently PHPStan doesn't understand any type assertions. For the beginning, it would be great to have just few basic:

  • Assert::type()
  • Assert::notNull()
hrach commented

I'm not in position to contribute here, but if is anybody interested, here is a minimal implementation for these two methods:
nextras/orm@79e796f Feel free to copy that code without any attribution.

I'm not in position to contribute here

Why not? it's really simple as you already showed. I'd even accept a PR with just these two methods, which you already implemented.

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.