Created
August 28, 2019 04:23
-
-
Save Herrytheeagle/e97555fffb89e2bcea0ff8577b06dc4f to your computer and use it in GitHub Desktop.
Quality Code Description 1
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
//Dirty code examples | |
public $notiSms; | |
public $addCmt; | |
foreach ($people as $x) { | |
echo $x->name; | |
} | |
$user->createUser(); | |
createUser method does not make sense as it is written in user class. | |
//Clean code examples | |
public $notifySms | |
public $addComment; | |
foreach ($people as $person) { | |
echo $person->name; | |
} | |
$user->create(); | |
Remove redundancy. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment