Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve PassableByReference variadic placeholder param support. #834

Merged

Conversation

sebdesign
Copy link

Similar to #695, this PR fixes a warning with the following code:

array_map(intval(...), ['1', '2']);

// Warning: Undefined property: PhpParser\Node\VariadicPlaceholder::$name.

@@ -61,6 +62,10 @@ public function enterNode(Node $node)

$args = [];
foreach ($node->args as $position => $arg) {
if ($node instanceof VariadicPlaceholder) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be $arg not $node, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right! I made a mistake while moving things around. I'll fix it in the next commit.

@bobthecow
Copy link
Owner

thanks!

@bobthecow bobthecow merged commit 202f2e8 into bobthecow:main Nov 18, 2024
27 checks passed
@bobthecow
Copy link
Owner

Great, thanks again 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants