Skip to content

Instantly share code, notes, and snippets.

@LC43
Last active August 26, 2018 16:22
Show Gist options
  • Save LC43/a6034f2401e75788dd86bf729cba28b7 to your computer and use it in GitHub Desktop.
Save LC43/a6034f2401e75788dd86bf729cba28b7 to your computer and use it in GitHub Desktop.
Example of poor documentation. It documents the part that is easier to read, but fails to explain why only future dates are important.
// if end date is in future
if ( $date_catchup_timestamp_end >= strtotime( 'now' ) ) {
// [...] do a lot of stuff
$program->end = $date_catchup_timestamp_end;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment