Document DocBlockTagOrder configuration#61
Merged
Conversation
Add a docs/README.md section covering the three public properties of PhpCollective.Commenting.DocBlockTagOrder: order (function/method docblocks), classOrder (class/interface/trait docblocks), and innerOrder (within-bucket ordering with prefix patterns). These were only discoverable by reading the sniff source. Includes both common innerOrder recipes (CRUD method ordering plus alphabetized property lists), notes the asymmetric handling of the leading at-sign on tag names between order/classOrder and innerOrder keys, and explains the InnerOrderInvalid error code as a scoping lever for keeping inner ordering on tables/views/controllers while skipping entity docblocks where DB-schema order is meaningful.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #59 / #60 - documents the three configurable properties on
PhpCollective.Commenting.DocBlockTagOrderindocs/README.md. Until now these were only discoverable by reading the sniff source.order- function/method docblock tag order (existed pre-Extend DocBlockTagOrder to class/interface/trait docblocks #59, made public there)classOrder- class/interface/trait docblock tag order (new in Extend DocBlockTagOrder to class/interface/trait docblocks #59)innerOrder- within-bucket ordering with prefix patterns (new in Add inner-bucket tag ordering to DocBlockTagOrderSniff #60)The section covers:
innerOrderrecipes - CRUD-style method ordering plus alphabetized property lists for IDE-helper-generated docblocksorder/classOrder, required literal forinnerOrderkeysInnerOrderInvaliderror code as a scoping lever, with anexclude-patternrecipe for keeping inner ordering on tables/views/controllers while skipping entity docblocks (where DB schema order is meaningful)Slotted between the "Disallow void return type on magic methods" and "Excluding test related comparison files" sections, matching the existing per-rule customization pattern in
docs/README.md.