Skip to content

Instantly share code, notes, and snippets.

@prodeveloper
Created September 3, 2014 22:49
Show Gist options
  • Save prodeveloper/b99682f7b8a6ec772004 to your computer and use it in GitHub Desktop.
Save prodeveloper/b99682f7b8a6ec772004 to your computer and use it in GitHub Desktop.
Introduce Parameter Object Refactor | Before Refactor
<?php
/**
* Hard to read the data
* Repeated values
* Lacks intent
*/
class Customer {
function amountInvoicedIn($start_date, $end_date) {
}
function amountReceicedIn($start_date, $end_date) {
}
function amountOverdueIn($start_date, $end_date) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment