This is a prime candidate for the [Strategy pattern][1]. For example, this code: if ($this->isDisputeAccepted($order)) { //returns true if dispute was accepted $order->setStatus('accepted'); $order->refund(); //refunds the order on ebay and internally in my system $this->insertRecordInOrderHistoryTable($order,'refunded'); } else if ($this->isDisputeCancelled($order)) { //returns true if dispute was cancelled $order->setStatus('cancelled'); $this->insertRecordInOrderHistory($order,'cancelled'); $order->rollBackRefund(); //cancels the refund on ebay and internally in my system } else if ($this->isDisputeOlderThan7Days($order)) { //returns true if 7 days elapsed since the dispute was opened $order->closeDispute(); //closes the dispute on ebay $this->insertRecordInOrderHistoryTable($order,'refunded'); $order->refund(); //refunds the order on ebay and internally in my system } Could be reduced to var $strategy = $this.getOrderStrategy($order); $strategy->preProcess(); $strategy->updateOrderHistory($this); $strategy->postProcess(); where getOrderStrategy wraps the order in a DisputeAcceptedStrategy, DisputeCancelledStrategy, DisputeOlderThan7DaysStrategy, etc. each of which know how to handle the given situation [1]: http://www.labelmedia.co.uk/blog/posts/design-patterns-strategy-pattern.html