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

[Php54] Add ArrayToShortArrayRector #2615

Merged
merged 4 commits into from Jul 3, 2022

Conversation

edsrzf
Copy link
Contributor

@edsrzf edsrzf commented Jul 3, 2022

Add a new rule to convert array() syntax to short array syntax, introduced in PHP 5.4.

@edsrzf edsrzf requested a review from TomasVotruba as a code owner July 3, 2022 09:10
@samsonasik
Copy link
Member

One more thing, could you rename to LongArrayToShortArrayRector, to sync with downgrade naming ShortArrayToLongArrayRector:

https://github.com/rectorphp/rector-downgrade-php/blob/c857264716a90041d463f29970b8d43074c05dc8/src/DowngradePhp54/Rector/Array_/ShortArrayToLongArrayRector.php#L19

@TomasVotruba
Copy link
Member

Thank you ✔️

@TomasVotruba TomasVotruba merged commit 0660b21 into rectorphp:main Jul 3, 2022
@edsrzf
Copy link
Contributor Author

edsrzf commented Jul 3, 2022

@samsonasik I didn't get a chance to rename to LongArrayToShortArrayRector before this was merged, as I was asleep. 😴 Would you like me to create another PR for that?

@TomasVotruba
Copy link
Member

Would you like me to create another PR for that?

That would be the best 👍 Thank you

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