Reto Refactorización WRP 34
<?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