Skip to content

Instantly share code, notes, and snippets.

@buiquangduc
Last active October 9, 2017 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buiquangduc/bc2104191059e72158dc3645c1192a66 to your computer and use it in GitHub Desktop.
Save buiquangduc/bc2104191059e72158dc3645c1192a66 to your computer and use it in GitHub Desktop.
Routine with communicational cohesion
<?php
//Example of routine with communicational 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 birth date
}
// This routine is communicational cohesion because two operations are related only by the face that they use the same data birth date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment