Skip to content

Update php snippet due to PSR-12 #548

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

oldy777
Copy link

@oldy777 oldy777 commented Feb 3, 2025

Definition for classes

The opening brace for the class MUST go on its own line; the closing brace for the class MUST go on the next line after the body.

Definition for methods

Method and function names MUST NOT be declared with space after the method name. The opening brace MUST go on its own line, and the closing brace MUST go on the next line following the body. There MUST NOT be a space after the opening parenthesis, and there MUST NOT be a space before the closing parenthesis.

Copy link
Collaborator

@OkelleyDevelopment OkelleyDevelopment left a comment

Choose a reason for hiding this comment

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

Hi @oldy777, the changes look good. I do have a question about one (see my other comment). Once that's clarified, then I'll approve and merge. Thanks!

@@ -174,12 +191,12 @@
"description": "Foreach loop"
},
"$… = array (…)": {
"prefix": "array",
"prefix": "arrayold",
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the purpose for renaming these array initializers?

Copy link
Author

@oldy777 oldy777 Apr 21, 2025

Choose a reason for hiding this comment

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

Hi, because the short array syntax is the default today, and the old syntax is only used for older versions of PHP.

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