Skip to content

Instantly share code, notes, and snippets.

@Herrytheeagle
Created August 28, 2019 04:23
Show Gist options
  • Save Herrytheeagle/e97555fffb89e2bcea0ff8577b06dc4f to your computer and use it in GitHub Desktop.
Save Herrytheeagle/e97555fffb89e2bcea0ff8577b06dc4f to your computer and use it in GitHub Desktop.
Quality Code Description 1
//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