Last active
October 9, 2017 17:44
-
-
Save buiquangduc/e6402699976ed8a013da032a04b3cb9a to your computer and use it in GitHub Desktop.
Routine with sequential cohesion
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 | |
//Example of routine with sequential cohesion | |
function randomRoutineName($birthDate) { | |
// Calculate the age from the birth date | |
$currentAge = // Stuff to get current age from birth date | |
// Calculate the retirement time from the current age | |
$retirementTime = // Stuff to get retirement time from current age | |
} | |
// This routine is sequential cohesion because the last operation need to use the result of the previous operation to calculate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment