Created
May 1, 2022 23:29
-
-
Save IvsonEmidio/55deabb979e6fde0910ebfdb1b08f3f0 to your computer and use it in GitHub Desktop.
SOLID - OCP - VIOLATION - EXAMPLE 2
This file contains 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 clients { | |
public function sendEmail (emailType: string){ | |
if (emailType === 'html'){ | |
let email = parseHtml(this.email); | |
} else if (emailType === 'plainText'){ | |
let email = parsePlainText(this.email); | |
} else if (emailType === 'numeric') { | |
let email = parseNumeric(this.email); | |
} | |
return util.sendEmail(this.email, this.user); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment