feat: implement addItemToReturnArray method#69
Conversation
…ifier and imports refs: #63
|
It inherits from this commit: #64 |
Coverage Report for CI Build 25724448856Coverage increased (+0.2%) to 98.807%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3b724c1f4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| protected function modify(Node $node): Node | ||
| { | ||
| foreach ($node->stmts as $stmt) { | ||
| if ($stmt instanceof ClassMethod && $stmt->name->name === $this->name) { |
There was a problem hiding this comment.
Detect duplicate methods case-insensitively
PHP method names are case-insensitive, but this duplicate check uses a case-sensitive comparison. If a class already has someMethod and addMethod('SomeMethod', ...) is called, this code will insert a second method instead of throwing, producing a file that fails when PHP loads it due to method redeclaration. The comparison should normalize case (or use a case-insensitive compare) before deciding uniqueness.
Useful? React with 👍 / 👎.
No description provided.