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

Make method naming consistent #9

Open
rotexdegba opened this issue Nov 30, 2018 · 0 comments
Open

Make method naming consistent #9

rotexdegba opened this issue Nov 30, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@rotexdegba
Copy link
Member

For consistency sake, wherever possible always have a me or my version of each method where possible: like makeAllKeysNumeric and makeAllMyKeysNumeric. Some already exist like mergeWith and mergeMeWith.

  • The me or my version of each method would modify the collection object upon which the method is being invoked and should consequently always return $this for fluency sake.
  • The non-(me or my) version of each method should perform the operation on a new copy of the collection and return the modified new copy of the collection (THE COLLECTION OBJECT UPON WHICH THE METHOD IS BEING INVOKED SHOULD NEVER BE MODIFIED).
    • Need to figure out if the copy should only copy items alone or should it also copy other collection properties like the registered methods?
@rotexdegba rotexdegba added the enhancement New feature or request label Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant