• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PHPCSStandards / PHP_CodeSniffer / 13823399634

12 Mar 2025 11:18PM UTC coverage: 77.494% (+0.07%) from 77.421%
13823399634

push

github

jrfnl
Ruleset: use `MessageCollector` for pre-existing errors

Notes:

**For the "invalid type" message**

Includes updating the message for the "invalid type" message to mention the reference for which the `type` was (incorrectly) being changed.
This should make it more straight forward for ruleset maintainers to find the problem in their ruleset.
It also makes the message more unique, as this message could occur in multiple places in a ruleset and there was no indication of that in the message previously.

Potential future scope for "invalid type" message

It could be considered to downgrade this message from an `ERROR` to a `NOTICE` as an invalid type is not blocking for running the sniffs, though this could lead to results not being as expected if, for instance, the `-n` flag is being used, which is why I've not changed this at this time.

**For the "register() method must return an array" error

Includes some new assertions which won't run until the test suite supports PHPUnit 10+ (PHPCS 4.0). These tests belong with this commit though, so adding them now anyway.

**For the "setting non-existent property" error

Includes minor adjustment to the error message (removal of "Ruleset invalid" and punctuation).

17 of 21 new or added lines in 1 file covered. (80.95%)

67 existing lines in 1 file now uncovered.

19279 of 24878 relevant lines covered (77.49%)

76.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

89.41
/src/Ruleset.php


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc