Nette Tester Asserts
hrach opened this issue · 6 comments
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()
Feel free to send a PR :) You can inspire yourself from https://github.com/phpstan/phpstan-phpunit/tree/master/src/Type/PHPUnit/Assert or from https://github.com/phpstan/phpstan-webmozart-assert/blob/master/src/Type/WebMozartAssert/AssertTypeSpecifyingExtension.php
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.