phpat icon indicating copy to clipboard operation
phpat copied to clipboard

Built-in classes should not be ignored when specifically requested in rules

Open carlosas opened this issue 1 year ago • 0 comments

When the option ignore_built_in_classes is enabled, and there is a rule like:

return PHPat::rule()
  ->classes(Selector::namespace('App\Whatever'))
  ->shouldImplement()
  ->classes(Selector::classname(\JsonSerializable::class));

PHPat reports:

App\Whatever\MyClass should implement JsonSerializable


Built-in classes should be removed from the violations, instead of the nodes to be checked.

carlosas avatar Jun 21 '23 15:06 carlosas