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

Use short array syntax recommended by PSR-2 #220

Merged
merged 1 commit into from
Oct 28, 2019

Conversation

peter-gribanov
Copy link
Member

PSR-2 does not mention short array syntax, but in chapter 4.3 they use short array syntax to set the default value of $arg3 to be an empty array.

So for PHP >= 5.4 the short array syntax seems to be the de-facto standard. The array() shold be used only for script to run on PHP < 5.4.

@peter-gribanov peter-gribanov self-assigned this Oct 28, 2019
@peter-gribanov peter-gribanov added this to the Release 1.1.0 milestone Oct 28, 2019
@peter-gribanov peter-gribanov merged commit 1011447 into Happyr:master Oct 28, 2019
@peter-gribanov peter-gribanov deleted the array_syntax_short branch October 28, 2019 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant