-
-
Save delineas/ce96d14e3994f65fe7a36cf23cba209a 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) | |
$result = $this->deadAmount(); | |
else { | |
if ($this->isSeparated) | |
$result = $this->separatedAmount(); | |
else { | |
if (!$this->isRetired) | |
$result = $this->normalPayAmount(); | |
else | |
$result = $this->retiredAmount(); | |
} | |
} | |
return $result; | |
} | |
// ... mas codigo | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment