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

[CodingStyle] Improve unspread array #5120

Merged
merged 3 commits into from
Jan 9, 2021
Merged

[CodingStyle] Improve unspread array #5120

merged 3 commits into from
Jan 9, 2021

Conversation

TomasVotruba
Copy link
Member

No description provided.

@TomasVotruba TomasVotruba changed the title unspread array [CodingStyle] Improve unspread array Jan 9, 2021
{
public function go()
{
$this->run('John', [1, 2, 3, 4, 5]);
Copy link
Member Author

Choose a reason for hiding this comment

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

@samsonasik Hey, just FYI, I had to update this rules to group items to an array like this.
It broke some code on Symplify.

Copy link
Member

Choose a reason for hiding this comment

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

Thank you

/**
* @param ClassMethod|MethodCall $node
*/
private function isInVendor(Node $node): bool
Copy link
Member Author

Choose a reason for hiding this comment

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

@samsonasik Just a tip for next code. The /vendor check can be done better by using NodeRepository. It contains all the nodes from parsed project. So what is not there, is in vendor :)

Copy link
Member

Choose a reason for hiding this comment

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

Thank you

@TomasVotruba TomasVotruba enabled auto-merge (squash) January 9, 2021 13:48
@TomasVotruba TomasVotruba merged commit 4756535 into master Jan 9, 2021
@TomasVotruba TomasVotruba deleted the unspread-array branch January 9, 2021 14:08
TomasVotruba added a commit that referenced this pull request Oct 5, 2023
rectorphp/rector-src@6aed089 [Php80] Skip when already implements Stringable and has string return type on StringableForToStringRector (#5120)
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