Fix `implementsInterface()` PHPDoc
class_implements accepts either an object or a class-string, but the PHPDoc for the assert function is wrong and limits its functionality to a class-string only. I'm not entirely sure if this was on purpose, the README just mentions "Check that a class implements an interface", but it would work with either an instance of a class or a class-string and the assertion is under the "object" category.
See also https://phpstan.org/r/c72bb8af-4f27-462b-85f6-e2d3b81b9786 where this is tested in PHPStan (which just got support for PHPDoc-based type narrowing, this is not released yet)
Refs: https://github.com/phpstan/phpstan-webmozart-assert/pull/144#issuecomment-1268122389
I could not cleanly run psalm locally without unrelated errors, let's see what happens on CI 🤞
The docs look good, could you add some test cases using objects, so we cover it in our unit tests?
The docs look good, could you add some test cases using objects, so we cover it in our unit tests?
sure, adapted
@BackEndTea in case you didn't see it: should be adapted. In case you're just busy: no worries, this is not important 😊