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

Add variable-length argument lists in NodeBuilder::leafs() #167

Closed
BrayanCaro opened this issue Feb 24, 2023 · 0 comments · Fixed by #168
Closed

Add variable-length argument lists in NodeBuilder::leafs() #167

BrayanCaro opened this issue Feb 24, 2023 · 0 comments · Fixed by #168
Assignees

Comments

@BrayanCaro
Copy link

BrayanCaro commented Feb 24, 2023

Suggestion

I think that we can take advantage of the ... syntax

Justification

Considering the documentation, they encourage us to avoid this technique:

Note: It is also possible to achieve variable-length arguments by using func_num_args(), func_get_arg(), and func_get_args() functions. This technique is not recommended as it was used prior to the introduction of the ... token.

Afected files:

public function leafs(mixed $value1 /* , $value2, ... */): static

public function leafs(mixed $value /* , $value2, ... */): static;

Is it a breaking change?

No, the users of this package could use NodeBuilder::leafs() as they are used to.

🌺

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

Successfully merging a pull request may close this issue.

2 participants