Proposal:
whereClass() matches Class_ only, so an interface declaration cannot be selected without dropping to a raw where(fn (AstNode $n) => $n->node instanceof Interface_). AstNode already answers isInterfaceDeclaration(), so the predicate exists but the selector to open a query over interfaces does not. Needed to write a rule that every interface carries a docblock.
Filed via commandments feature-request from a consumer project.
Proposal:
whereClass() matches Class_ only, so an interface declaration cannot be selected without dropping to a raw where(fn (AstNode $n) => $n->node instanceof Interface_). AstNode already answers isInterfaceDeclaration(), so the predicate exists but the selector to open a query over interfaces does not. Needed to write a rule that every interface carries a docblock.
Filed via
commandments feature-requestfrom a consumer project.