Skip to content

Instantly share code, notes, and snippets.

@Herrytheeagle
Created August 28, 2019 04:32
Show Gist options
  • Save Herrytheeagle/5c5a78b96146ac3eedfd038d4104eb25 to your computer and use it in GitHub Desktop.
Save Herrytheeagle/5c5a78b96146ac3eedfd038d4104eb25 to your computer and use it in GitHub Desktop.
Quality Code Description 2
//Dirty code examples
protected $d; // elapsed time in days
if (‘paid’ === $application->status) {
//process paid application
}
//Clean code examples
protected $elapsedTimeInDays;
protected $daysSinceCreation;
protected $daysSinceModification;
protected $fileAgeInDays;
if ($application->isPaid()) {
//process paid application
}
//Dirty code examples
public function priceIncrement()
Public
$lengthValidateSubDomain
class calculationIncentive
//Clean code examples
public function increasePrice()
Public $validateLengthOfSubdomain;
class Incentive
@Herrytheeagle
Copy link
Author

Quality Code Description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment