Repository navigation
Apply responsibility-based coding style and alias conventions - #20
Merged
Merged
Conversation
gachakra
commented
Dec 3, 2026
gachakra
left a comment
Owner
Author
There was a problem hiding this comment.
Independently reviewed 666f380c30cfef80fd0ede35348a535bbec220d8 against dd89613ed1168a5ffe0a4a66c2675b41d56d5e92. No actionable findings.
- Method organization and layout. Constructors lead the affected classes where declared. The native collections keep lookup, mapping by source, selection, and lazy iteration families together. Direct access and basic metadata precede derived representations where that order fits the class. Predicates and magic methods follow their corresponding operation groups. I checked declaration and assignment alignment, nested match arms, and blank lines where they mark changes in responsibility.
- Aliases and projections. The seven Class-based forwarding aliases link to their originals with
@seeand retain applicable return shapes, exceptions, and compatibility notes. The two projections,qualifiedNames()andvalueToName(), describe their distinct results and include concrete examples. I exercised all nine methods and checked their types with PHPStan, including map keys and custom delimiters in the runtime checks. - Historical API and compatibility. All 40 pre-#18 Class-based method blocks, including PHPDoc and implementation, match byte-for-byte in their original relative order. The nine methods introduced in #18 are the final method group. Beyond declaration placement and insignificant whitespace, I found no executable token or signature differences in 236 methods across 16 changed PHP files. The three changed README PHP snippets also preserve their executable content. Reflection exposes the intended declaration-order change for reordered methods.
- Independent verification. PHP 8.4.28 and 8.5.13 each passed 369 PHPUnit tests with 1,577 assertions, all 25 executable examples with assertions enabled, PHPStan 2.3.7 CI checks, the targeted alias and projection type checks, PHP lint, and the Composer metadata, platform, and strict PSR-4 checks. Both distribution archive checks passed. The selection fixture retained its 13 expected diagnostics.
gachakra
marked this pull request as ready for review
December 3, 2026 08:38
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
@seefor forwarding aliases and concrete examples for projections.Scope and verification
No intentional changes to signatures, method bodies, dependencies or runtime contracts. For the five reordered native source files and Class-based Enum, the authoring check compared method bodies before and after reordering. All pre-existing Class-based method blocks (including PHPDoc) were also compared in their original relative order. Automated formatting tools are not introduced. No PHP execution tests have been run in the authoring environment; CI and independent review are pending. Review method ordering, whitespace-only changes, PHPDoc and README examples, and ensure static-analysis checks still pass after line-number changes.