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

Rule: Do not provide static methods and properties #19

Open
lbajsarowicz opened this issue May 3, 2018 · 4 comments
Open

Rule: Do not provide static methods and properties #19

lbajsarowicz opened this issue May 3, 2018 · 4 comments
Labels
accepted This rule is accepted by extdn

Comments

@lbajsarowicz
Copy link

Paamayim Nekudotayim (double collon / static) should not be used in classes (except reference to const).

@schmengler
Copy link
Collaborator

This seems too strict for me and hard too explain. It is not only required for constants, but also for calls to parent or to grand-parent by class name.

If you want to discourage static methods and static properties, the rule could be "do not provide static methods and properties". This is debatable too, but more clear.

@lbajsarowicz
Copy link
Author

@schmengler 👍
I can agree that your approach is much better than the one I suggested.

@schmengler schmengler added on agenda of hangout This issue will be discussed in the next open hangout and removed debate needed labels May 15, 2018
@schmengler
Copy link
Collaborator

Potential restrictions of this rule (to be discussed)

  • static methods without side effects
  • static methods as named constructors

@schmengler schmengler changed the title Rule: Paamayim Nekudotayim (double collon, static) reference should not be used Rule: Do not provide static methods and properties May 28, 2018
@schmengler
Copy link
Collaborator

For now, accepted in the form of:

no public static and protected static method/field definitions.

(medium warning level)

@schmengler schmengler added accepted This rule is accepted by extdn and removed on agenda of hangout This issue will be discussed in the next open hangout labels Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted This rule is accepted by extdn
Projects
None yet
Development

No branches or pull requests

2 participants