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

Some methods could probably better be static #6

Closed
micschk opened this issue Dec 3, 2016 · 1 comment
Closed

Some methods could probably better be static #6

micschk opened this issue Dec 3, 2016 · 1 comment
Assignees
Labels

Comments

@micschk
Copy link

micschk commented Dec 3, 2016

For exampe:

  • Web::getClosestWebColor
  • Web::getNameFromHex
  • Web::extractHexCode
  • ...

Actually, all of the methods in Web seem to be working with arguments, none of them depend on an instantiated object ($this)?

@nicolaasuni nicolaasuni self-assigned this Dec 3, 2016
@nicolaasuni
Copy link
Member

Generally speaking, static methods break a lot of the power available to Object-Oriented code and make harder to perform unit testing.
A lot has been written on this subject, a web search should give you more details ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants