Created
September 9, 2019 06:46
-
-
Save goiblas/f23e14fabc4757928157675aecfbbf20 to your computer and use it in GitHub Desktop.
Reto Refactorización WRP 34
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
<?php | |
class Payment { | |
// ... mas codigo | |
function getCantidades() | |
{ | |
if ($this->isDead) | |
return $this->deadAmount(); | |
if ($this->isSeparated) | |
return $this->separatedAmount(); | |
if ($this->isRetired) | |
return $this->retiredAmount(); | |
return $this->normalPayAmount(); | |
} | |
// ... mas codigo | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment