Last active
July 29, 2018 15:29
-
-
Save raulmoyareyes/315a00166002fb499e3be2c538cdde10 to your computer and use it in GitHub Desktop.
[ Wrong ] - Single Responsability Principle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UserSettings { | |
constructor(user) { | |
this.user = user; | |
} | |
changeSettings(settings) { | |
if (this.verifyCredentials()) { | |
// ... | |
} | |
} | |
verifyCredentials() { | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment