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

Add recommendation about XhasY naming #33

Open
Bearfinn opened this issue Jan 21, 2021 · 1 comment
Open

Add recommendation about XhasY naming #33

Bearfinn opened this issue Jan 21, 2021 · 1 comment

Comments

@Bearfinn
Copy link

I have encountered a case where a boolean is telling if Entity A has Entity B.
For example, if an admin has members.

How should it be named? (The following are examples of what I have searched)

  • hasAdminMembers
  • adminHasMembers
  • isAdminHavingMembers

I think this would be a good thing to include in this cheatsheet as I, and many others, might have stumbled in such a case.

@ElDiabloComputatore
Copy link

Hi Bearfinn!

I suggest using simple "has" -> hasMembers, as a current context is an entity A.
If the suggestion is not good enough, try to describe the context more.

Cheers.

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

No branches or pull requests

2 participants